Converting a list to a dictionary

Samuel knipknap at gmail.com
Wed Mar 14 21:52:34 CET 2007


On Mar 14, 9:48 pm, "Drew" <olso... at gmail.com> wrote:
> This is interesting behavior, but may not be what the original poster
> intended.

I am the original poster :).

> If I understand correctly, this means that if more than one
> object shares the same id, only one copy will be created in the dict.
> Is this correct?

Yes. Dictionaries are just hashes; you can't have the same key twice.

Bye,
-Sam




More information about the Python-list mailing list