[Python-3000] set literals

Fredrik Lundh fredrik at pythonware.com
Thu Jul 13 12:31:09 CEST 2006


Greg Ewing wrote:

>> I say nuke it. Who needs it?
>
> There are algorithms which effectively involve a
> mapping keyed by a set. E.g. converting an NFA
> to a DFA requires building up sets of states from
> the NFA and associating each one with a state in
> the DFA.
>
> You can kludge around it, but it would be nice
> to be able to express this kind of thing directly
> using the builtin support for sets.

but wouldn't the typical kludge (use a serial based on len(dict) to keep
track of things) be a lot more efficient than the non-kludge solution (use
a pointer and a full recursive compare) ?  is it even a kludge ?

</F> 





More information about the Python-3000 mailing list