Georg Brandl wrote: > This is not possible. Assignments in the form > > name = value > > (also called "binding a name") are not overloadable.
footnote: unless you execute the code in a controlled environment: class mydict(dict): def __setitem__(self, key, value): print "SET", key, value self.__dict__[key] = value ns = mydict() exec "a = 10" in ns </F> -- http://mail.python.org/mailman/listinfo/python-list