is it possible to set namespace to an object.

glomde brkict at gmail.com
Mon Jan 21 18:25:57 CET 2008


Hi,

is it somehow possible to set the current namespace so that is in an
object.
Somthing like.

class Test():
      ....

testObj = Test()

set namespace testObj
Name = "Test"

Name would set testObj.Name to "Test".

I was thinking this could be done with the with statement somehow
(without using as) in the __enter__
function.

Is the above possible?

/T



More information about the Python-list mailing list