[Python-ideas] Fwd: Extremely weird itertools.permutations

Oscar Benjamin oscar.j.benjamin at gmail.com
Mon Oct 14 01:10:51 CEST 2013


On 13 October 2013 22:22, Tim Peters <tim.peters at gmail.com> wrote:
> 2. Making "equality" pluggable.  Your later algorithm bought "find
> equivalence classes" speed for hashable elements by using a dict, but
> a dict's notion of equality can't be changed.  So, make equality
> pluggable, and that startup-time speed advantage vanishes for all but
> operator.__eq__'s idea of equality.

It sounds like you want Antoine's TransformDict:
http://www.python.org/dev/peps/pep-0455/


Oscar


More information about the Python-ideas mailing list