division

Sean Ross frobozz_electric at hotmail.com
Tue Jun 24 02:36:49 CEST 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