operator overloading + - / * = etc...
python.list at tim.thechases.com
Sat Oct 7 23:48:49 CEST 2006
>> Can these operators be overloaded?
With the caveat of the "=" mentioned in the subject-line (being
different from "==")...I haven't found any way to override
assignment in the general case. There might be some oddball way
to do it via property() but AFAIK, this only applies to
properties of objects, not top-level names/variables. I'd love
to know if there's some workaround for this though...
More information about the Python-list