Hi, I see that sage has a method for computing the quotient and reminder of the integer division called "quo_rem" (in integer.pyx) However, there exist a standard operator in python call divmod: in sage divmod does not work as one would expect.
sage: ZZ(2).quo_rem(ZZ(3)) (0, 2) sage: divmod(ZZ(2),zz(3)) --------------------------------------------------------------------------- <type 'exceptions.NameError'> Traceback (most recent call last) /hdc1/pablo.hdc1/sage/sage/<ipython console> in <module>() <type 'exceptions.NameError'>: name 'zz' is not defined in standard iPython: In [1]: divmod(2,3) Out[1]: (0, 2) Would it better to use the standard name divmod for this operator [by defining a method __divmod__] (or other operators already defined in python) when possible? best regards Pablo --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/ -~----------~----~----~----~------~----~------~--~---
