Matlab vs Python (was RE: Discussion: Introducing new operators for matrix computation)

Andrew Kuchling akuchlin at mems-exchange.org
Sat Jul 22 09:41:17 EDT 2000


Thomas Wouters <thomas at xs4all.net> writes:
> Any idea why are += and friends still not implemented, after 5+ years of
> Python development ? Guido and Tim both claim they wanted it years ago. Yet

Probably because it posed some language design problems.  When 'obj'
is some object, obj += 5 needs to call some method.  What if you have
code like: 'a=1 ; a += obj'; is it an error?  Do you call a separate
__r_addinplace__ method?  Does 'a' transmogrify from an regular int to
an object just from a +=?  Will users expect this?

--amk



More information about the Python-list mailing list