On Mon, May 4, 2009 at 12:19 PM, Jaap Spies <j.sp...@hccnet.nl> wrote: > Another Python builtin is pow(), but how is it possible that > type(pow(2,9,11)) returns > <type 'sage.rings.integer_mod.IntegerMod_int'> > > Or am I mistaken?
The pow() builtin just calls __pow__ on the first argument in that case, which we control so we can return one of our types. len() will call __len__, but forces whatever is returned to be an int. This is what will be changing in Python 3.0. --Mike --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---