Help with sets

Lawrence D'Oliveiro ldo at geek-central.gen.new_zealand
Thu Oct 7 07:48:17 CEST 2010

In message <87bp79qdhk.fsf at>, Paul Rudin wrote:

> Certainly you can model a set as a dictionary, but that's likely to be
> less efficient than using a set, and quite possibly you'll need to roll
> your own operations on your sets, whereas they're provided for the built
> in implementation.

Did you know that applying the “set” or “frozenset” functions to a dict 
return a set of its keys?

Seems a bit dodgy, somehow.

More information about the Python-list mailing list