List of Dictionaries

Erik Max Francis max at alcyone.com
Thu Mar 7 20:48:31 EST 2002


Lenny Self wrote:

> When I add the first dictionary element to the list all is well.  When
> I add the second element to the list both the first and second element
> reference the second dictionary that was added.  The behavior
> continues whenever I add an element.  So, if I add, say 50
> dictionaries, all of the listes elements reference the last dictionary
> I added.
> 
> I don't have the code with me right now, but I can assure you it is
> easy as this:

The problem you're having crucially depends on you doing something wrong
in the details of your implementation.  You're going to have to show us
the _exact_ code that is causing this problem or it will be impossible
to help you.

-- 
 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