On Jan 20, 8:31 pm, Ben Finney <ben+pyt...@benfinney.id.au> wrote:
> Since (I presume) you are a newcomer to Python, it's best to learn the
> common style <URL:http://www.python.org/dev/peps/pep-0008/>.
Thanks for that.

> This is almost certainly better done with a dictionary. Like so::
>
>     object_names = ['object1', 'object2', 'object3', 'object4']
>     objects = {}
>     for object_name in object_names:
>         objects[object_name] = Class()

And thanks for that too. I see it returns a list of objects, Python is
very cool.

-- Gnarlie

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

Reply via email to