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

Neil Girdhar mistersheik at gmail.com
Tue Jun 10 08:04:58 CEST 2014


I really like this and hope that it eventually makes it into the stdlib. 
 It's also a good argument for your other suggestion whereby some of the 
itertools to return Iterables rather than Iterators like range does.

Best,

Neil

On Wednesday, May 7, 2014 1:43:20 PM UTC-4, Ram Rachum wrote:
>
> I'm probably going to implement it in my python_toolbox package. I already 
> implemented 30% and it's really cool. It's at the point where I doubt that 
> I want it in the stdlib because I've gotten so much awesome functionality 
> into it and I'd hate to (a) have 80% of it stripped and (b) have the class 
> names changed to be non-Pythonic :)
>
>
> On Wed, May 7, 2014 at 8:40 PM, Tal Einat <tale... at gmail.com <javascript:>
> > wrote:
>
>> On Wed, May 7, 2014 at 8:21 PM, Ram Rachum <ram.r... at gmail.com 
>> <javascript:>> wrote:
>> > Hi Tal,
>> >
>> > I'm using it for a project of my own (optimizing keyboard layout) but I
>> > can't make the case that it's useful for the stdlib. I'd understand if 
>> it
>> > would be omitted for not being enough of a common need.
>>
>> At the least, this (a function for getting a specific permutation by
>> lexicographical-order index) could make a nice cookbook recipe.
>>
>> - Tal
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20140609/df0cf112/attachment.html>


More information about the Python-ideas mailing list