Re: dynamic creation of global Identifier

2006-10-11 Thread Steve Holden
Theerasak Photha wrote: > On 10/11/06, Alexander Eisenhuth <[EMAIL PROTECTED]> wrote: > > >>but why doesent exec "global ... create a identifier in the global namespace. > > > I haven't had much use for exec, but it operates in its own, more or > less cloistered namespace. It can't set globals

Re: dynamic creation of global Identifier

2006-10-11 Thread Theerasak Photha
On 10/11/06, Alexander Eisenhuth <[EMAIL PROTECTED]> wrote: > but why doesent exec "global ... create a identifier in the global namespace. I haven't had much use for exec, but it operates in its own, more or less cloistered namespace. It can't set globals among other things. You can frob the gl

dynamic creation of global Identifier

2006-10-11 Thread Alexander Eisenhuth
Hello alltogether, I've a little problem in creating a new identifier in the global namespace. The following code creates a as local var in the namespace of init() class A: def __init__(self, v): print "ctr of", self.__class__, "with", v self._v = v def i