Create object name from string value?

Gnarlodious gnarlodious at
Thu Jan 21 04:02:49 CET 2010

I want to declare several objects from names in a list:

objects=['object1', 'object2', 'object3', 'object4']
for objectName in objects:

That fails, and so do these:


So how to make an object whose name is the value in the variable?

-- Gnarlie

More information about the Python-list mailing list