overriding '=' operator?

Erik Max Francis max at alcyone.com
Thu Oct 30 16:05:40 EST 2003


user at domain.invalid wrote:

> Is it possible to override assignment, the
> way that '+' can be overridden for example?

You can in statements like

	a[i] = something

or

	a.x = something

by overriding methods on the a object, but you cannot override the
behavior for

	a = something

-- 
   Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
 __ San Jose, CA, USA && 37 20 N 121 53 W && &tSftDotIotE
/  \ After a thousand years or so you go native.
\__/  Camden Benares




More information about the Python-list mailing list