Dictionaries in Lists

Erik Max Francis max at alcyone.com
Wed Mar 6 16:21:31 EST 2002


Avi Homes wrote:

> Am I approaching the idea the wrong way? i
> would like to keep the data organized as dictionaries.. 

No, there's nothing wrong with the approach that you describe, provided
that it's appropriate to the problem you want to solve.

> ... the code looked
> something like
> 
> Info{'IName':"Voodoo2",'IDescription':"blahblah}
> Listing=[]
> Listing.append(Info)

This code contains at least one type; there's a missing assignment on
the first line.  This illustrates the essential nature of asking for
programming help; you have to be able to provide the _exact_ code that
you tried to use and the _exact_ error that you got, or your would-be
benefactors will not be able to help you.  I can't tell whether that
missing assignment is in fact your problem or is just a typo that you
made while posting.

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/  \ Laws are silent in time of war.
\__/ Cicero
    Esperanto reference / http://www.alcyone.com/max/lang/esperanto/
 An Esperanto reference for English speakers.



More information about the Python-list mailing list