division

Sean Ross frobozz_electric at hotmail.com
Mon Jun 23 20:36:49 EDT 2003


>
> Adding the following method to the myint class solves this issue:
>
>      def __rdiv__(self, other):
>             return self.__div__(other)
>

Sorry, it's the other way around, add this method:

def __rdiv__(self, other):
        return other.__div__(self)






More information about the Python-list mailing list