Sean DiZazzo skrev:
I would do something like this:class Namespace(object):... pass ...n = Namespace() n.f = 2 n.g = 4 print fTraceback (most recent call last): File "<stdin>", line 1, in ? NameError: name 'f' is not definedprint n.f2
I like this solution. This also minimizes the extra code if I would want to explicitly delete the bindings, as I would only need one line to delete the Namespace object.
Thanks! Johan -- http://mail.python.org/mailman/listinfo/python-list