[Python-ideas] Implement `itertools.permutations.__getitem__` and `itertools.permutations.index`
Steven D'Aprano
steve at pearwood.info
Tue Nov 18 00:05:17 CET 2014
On Mon, Nov 17, 2014 at 09:57:55PM +0200, Ram Rachum wrote:
> Ah, I understand. I don't like it, though I'm not sure I can really express
> why. One reason is that this would mean that PermSpaces would be mutable,
> and thus not hashable and not usable as keys in dicts and sets.
I'm having trouble thinking of any reason to use a PermSpace as a dict
key or set element. Do you have a concrete example of doing so?
--
Steven
More information about the Python-ideas
mailing list