DanielStutzbach / blist

A list-like type with better asymptotic performance and similar performance on small lists
Other
313 stars 35 forks source link

Provide a sortedfrozenset type #22

Open DanielStutzbach opened 14 years ago

mikegraham commented 14 years ago

Is there any need for this? I have yet to find a compelling use case for frozenset at all.

jcassee commented 14 years ago

A frozenset is hashable, so it can be the element of a set, dict key, etc. Assuming sortedfrozenset would have the same advantage it would be useful.

mikegraham commented 14 years ago

I understand that frozenset is hashable and what uses this allows. I have just yet to actually need a set of frozensets or ever wanted to use a frozenset as a dict key or noticed people doing so in the wild.

jcassee commented 14 years ago

Sorry, I took you question a bit too literally. As you may have surmised, I have been using sets of sets in algorithmic Python code. (Not in the wild though, just the safety of my notebook.)