possible to overide setattr in local scope?

glomde brkict at gmail.com
Tue Jan 22 07:14:01 EST 2008


In a class it is poosible to override setattr, so that you can decide
how you should
handle setting of variables.

Is this possible to do outside of an class on module level.

mysetattr(obj, var, value):
  print "Hello"

So that

test = 5


would print
Hello



More information about the Python-list mailing list