Re: Creating Unique Dictionary Variables from List

2007-04-12 Thread Bruno Desthuilliers
Steven D'Aprano a écrit : > On Wed, 11 Apr 2007 21:03:20 +0200, Bruno Desthuilliers wrote: > > >>Greg Corradini a écrit : >> >>>Hello All, >>>I'm attempting to create multiple dictionaries at once, each with unique >>>variable names. The number of dictionaries i need to create depends on the >>>l

Re: Creating Unique Dictionary Variables from List

2007-04-11 Thread Steven D'Aprano
On Wed, 11 Apr 2007 21:03:20 +0200, Bruno Desthuilliers wrote: > Greg Corradini a écrit : >> Hello All, >> I'm attempting to create multiple dictionaries at once, each with unique >> variable names. The number of dictionaries i need to create depends on the >> length of a list, which was returned

Re: Creating Unique Dictionary Variables from List

2007-04-11 Thread Bruno Desthuilliers
Greg Corradini a écrit : > Bruno, > Your help is much appreciated. Then give thanks to Dennis too !-) > I will give this a try tomorrow morning and > get back on how it works. Don't worry, it just works - and it's the idiomatic solution to the problem you described. -- http://mail.python.org

Re: Creating Unique Dictionary Variables from List

2007-04-11 Thread Greg Corradini
to store your dicts: > > returnedlist = [x,y,z] > dicts = dict() > for num, item in enumerate(returnedlist): > dicts['dict%s' % num] = dict() > -- > http://mail.python.org/mailman/listinfo/python-list > > -- View this message in context: http://www.nab

Re: Creating Unique Dictionary Variables from List

2007-04-11 Thread Bruno Desthuilliers
Greg Corradini a écrit : > Hello All, > I'm attempting to create multiple dictionaries at once, each with unique > variable names. The number of dictionaries i need to create depends on the > length of a list, which was returned from a previous function. > The pseudo code for this problem would be:

Creating Unique Dictionary Variables from List

2007-04-11 Thread Greg Corradini
t: http://www.nabble.com/Creating-Unique-Dictionary-Variables-from-List-tf3560471.html#a9943321 Sent from the Python - python-list mailing list archive at Nabble.com. -- http://mail.python.org/mailman/listinfo/python-list

Creating Unique Dictionary Variables from List

2007-04-11 Thread Greg Corradini
t: http://www.nabble.com/Creating-Unique-Dictionary-Variables-from-List-tf3560470.html#a9943320 Sent from the Python - python-list mailing list archive at Nabble.com. -- http://mail.python.org/mailman/listinfo/python-list

Creating Unique Dictionary Variables from List

2007-04-11 Thread Greg Corradini
bble.com/Creating-Unique-Dictionary-Variables-from-List-tf3560469.html#a9943317 Sent from the Python - python-list mailing list archive at Nabble.com. -- http://mail.python.org/mailman/listinfo/python-list