[Python-Dev] Re: the "3*x works w/o __rmul__" bug
Guido van Rossum
guido at python.org
Tue Oct 28 10:16:37 EST 2003
> So perhaps for 2.3 we should just apologetically note the anomaly
> in the docs, and for 2.4 forbid the former case, i.e., require both
> __mul__ AND __rmul__ to exist if one wants to code sequence
> classes that can be multiplied by integers on either side...?
> Any opinions, anybody...?
What's wrong with the status quo? So 3*x is undefined, and it happens
to return x*3. Is that so bad?
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-Dev