<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<div class="moz-text-flowed"
 style="font-family: -moz-fixed; font-size: 14px;" lang="x-western">Another
deep python question...is it possible to have code run whenever a
particular object is assigned to a variable (bound to a variable)?
<br>
<br>
So, for example, I want the string "assignment made" to print out
whenever my class "Test" is assigned to a variable:
<br>
<br>
class Test:
<br>
   ...
<br>
<br>
x = Test
<br>
<br>
would print:
<br>
<br>
"assignment made"
<br>
<br>
Note that there's no "()" after x = Test, I'm not actually
instantiating Test, just binding the class to the variable "x"
<br>
Make sense?
Possible?<br>
-David
<br>
</div>
<pre class="moz-signature" cols="72">-- 
Presenting:
mediocre nebula.
</pre>
</body>
</html>