[SciPy-dev] Suppressing of numpy __mul__, __div__ etc

Charles R Harris charlesr.harris@gmail....
Sat Dec 12 15:52:12 CST 2009


On Sat, Dec 12, 2009 at 2:16 PM, Robert Kern <robert.kern@gmail.com> wrote:

<snip>


> I think what he is asking for is an empty mixin class which other
> folks could subclass to mark their classes. It would say "Hey,
> ndarray! Let my __mul__, __rmul__, etc., take priority over yours,
> regardless of which of us comes first in the expression." Otherwise,
> ndarray will gladly consume pretty much any object on the other side
> of the operator because it will treat it as an object scalar.
>
> We could also define a standard attribute that could mark

such classes
> instead of requiring a mixin subclass.
>
>
Ah, I completely misunderstood. Nevermind...

I think such a mixin base class would be useful.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-dev/attachments/20091212/b1e24881/attachment.html 


More information about the SciPy-Dev mailing list