>
>
> That's a substantial difference, IMHO. 
>
> If you do a+b, then Python calls a.__add__(b). So, Python being object 
> oriented, you can easily overload the a.__add__ method. Sage has the 
> class sage.structure.element.RingElement, which overloads the 
> __add__ method, and if you sub-class it, you should in fact implement 
> _add_ with single underscore. 
>
> But max is a Python builtin *function*. Overloading it by something else 
> would break a lot of things, and I guess performance would suffer, if 
> you overload max() by a function that first checks whether one of the 
> arguments is a symbolic expression. 
>

Thanks, Simon, for this great explanation - that is essentially the 
argument given at http://trac.sagemath.org/sage_trac/ticket/6949 where this 
was implemented.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
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.
Visit this group at http://groups.google.com/group/sage-support?hl=en.


Reply via email to