assignment to __class__ (was Re: Copy constructors)
Guido van Rossum
guido at python.org
Mon Aug 13 18:32:53 EDT 2001
> Python programmers use the following idiom:
>
> class A:
> # ...
> def __mul__(self, other):
> ...
> __rmul__ = __mul__
>
>
> If I understood correctly, __rmul__ will be of different
> category from __mul__? This causes asymmetry...
Sorry, you must have misunderstood. They will be the same.
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-list
mailing list