Overloading assignment operator

Achim Domma domma at procoders.net
Tue Jan 23 13:24:41 EST 2007


Hi,

I want to use Python to script some formulas in my application. The user 
should be able to write something like

A = B * C

where A,B,C are instances of some wrapper classes. Overloading * is no 
problem but I cannot overload the assignment of A. I understand that 
this is due to the nature of Python, but is there a trick to work around 
this?
All I'm interested in is a clean syntax to script my app. Any ideas are 
very welcome.

regards,
Achim



More information about the Python-list mailing list