Converting a list to a dictionary

Drew olsonas at gmail.com
Wed Mar 14 16:59:27 EDT 2007


On Mar 14, 4:52 pm, "Samuel" <knipk... at gmail.com> wrote:
> 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

Doh! *Hangs head in shame and walks away slowly...* Thanks for you
gracious response :)




More information about the Python-list mailing list