David Hirschfield wrote:
> 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:
>
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