You could also make your own sub-class like:

class mylist(list):
    def sum(self):
        return sum(self)

but then you would have to explicitly cast things to this class.

-M. Hampton

On Jul 11, 11:47 am, Harald Schilly <harald.schi...@gmail.com> wrote:
> the int->integer replacement is done by a preparser. if you turn it
> off, sage is "pure" python only.
> the list is a pure python object and i don't think it makes sense to
> change anything. I recommend you to use a "vector",
> sage: vector(RDF, [1,2,3])
>
> h
>
> On Jul 11, 6:41 pm, Carlos Cordoba <ccordob...@gmail.com> wrote:
>
> > Hi,
>
> > I noticed that the int python type is replaced by the Integer type in
> > Sage. I'm wondering if I could do the same with the list type, so I
> > can add a functionality I need to it.
>
> > Could you tell how I can do it?
>
> > Thanks,
> > Carlos
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to