Another
deep python question...is it possible to have code run whenever a
particular object is assigned to a variable (bound to a variable)?
So, for example, I want the string "assignment made" to print out whenever my class "Test" is assigned to a variable: class Test: ... x = Test would print: "assignment made" Note that there's no "()" after x = Test, I'm not actually instantiating Test, just binding the class to the variable "x" Make sense? Possible? -David -- Presenting: mediocre nebula. |
-- http://mail.python.org/mailman/listinfo/python-list