Re: naming objects from string



manstey wrote:

Hi,

But this doesn't work if I do:

a=object()
x='bob'
locals()[x] = a

How can I do this?

try
sys.modules[__name__].__dict__[x] = a

But what's the point?


--
damjan
.