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 globals like so

import __builtin__
__builtin__.__dict__['foo'] = 42

But by the time you get there, it is almost certainly time to refactor.

-- Theerasak
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to