Sets in Python

Chris Mellon arkanes at gmail.com
Thu Sep 20 19:18:07 CEST 2007


On 9/20/07, OKB (not okblacke) <brenNOSPAMbarn at nobrenspambarn.net> wrote:
> Steven D'Aprano wrote:
>
> > But of course you can't look up the dict by value, only by
> > identity. But that's what you wanted.
>
>         Actually, if I understand the OP's examples right, he wants to look
> up only by value, not by identity.
>

He's switched at least twice, as I understand his writing. Currently,
he appears to want to look up by value, copying lists on insertion,
and is ignoring what happens if you mutate the key.



More information about the Python-list mailing list