[Python-Dev] re: LANL syntax (assignment)
gvwilson@nevex.com
gvwilson@nevex.com
Thu, 3 Feb 2000 19:02:46 -0500 (EST)
> > Greg Wilson wrote:
> > 3. "Where is '+=' ?" and "Why can't I redefine assignment?"
> Ka-Ping Yee:
> += would be nice; not a really big deal to me.
>
> Redefining assignment would get way too confusing, i think.
> __setitem__ has always been good enough for me.
It'll make a big difference to NumPy (avoiding temporaries, etc.). Also
hard to explain why you can redefine assignment to an array element, but
not to a scalar variable.
Thanks,
Greg