hi there,

this is probably just a silly Python question, but let me try. I've
designed a little class that has a __add__() method, and it works fine
for expressions like x+y. However, sum() does not work on a list of
such objects ! do I need to do something else ? (in the meanwhile i go
reduce(lambda x,y : x+y, list) which is cumbersome).

along the same lines, my class has a __str__() method, and 'print x'
works. But 'print L' where L is a list of such objects does not
work...

any idea?

thanks a lot!
pierre

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to