[Python-ideas] Implement `itertools.permutations.__getitem__` and `itertools.permutations.index`

Ram Rachum ram.rachum at gmail.com
Mon May 5 18:07:27 CEST 2014


And now that I think about it, I'd also like to give it a `__len__`, and to 
give `itertools.product` the same treatment. What do you think? 

On Monday, May 5, 2014 4:17:16 PM UTC+3, Ram Rachum wrote:
>
> I suggest implementing:
>
>  - `itertools.permutations.__getitem__`, for getting a permutation by its 
> index number, and possibly also slicing, and 
>  - `itertools.permutations.index` for getting the index number of a given 
> permutation. 
>
> What do you think? 
>
>
> Thanks,
> Ram.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20140505/e66d42e1/attachment.html>


More information about the Python-ideas mailing list