Suggesting for overloading the assign operator
Rim
rimbalaya at yahoo.com
Thu Jul 3 01:19:51 EDT 2003
Everyone! Thanks a lot for the insightful and enlightening discussion.
I think the suggestion to solve the problem by using the __setattr__
special method will not work because it intercepts attribute
assignment of the form "self.attr = somthing", and not what I want,
which is "name = something".
John suggested to look at properties, this is the closest I can get to
the
behavior I am looking for, but from my understanding, that will let me
intercept "name.value = something" instead of intercepting "name =
something".
Thank you very much everyone.
- Rim
More information about the Python-list
mailing list