[docs] Wrong calculation in itertools documentation

Sander De Graaf sander at rotzorg.org
Thu Nov 1 14:06:21 CET 2012


You are correct. I'm not sure where I failed, but I did :)

Thanks
Sander

On 31 okt. 2012, at 10:37, Andrew Svetlov <andrew.svetlov at gmail.com> wrote:

> Sure, the doc is correct. The count if permutations is n! / (n-r)!
> Try yourself, please.
> 
> On Sun, Oct 7, 2012 at 1:29 AM, Sander De Graaf <sander at rotzorg.org> wrote:
>> Hi,
>> 
>> I'm reading docs.python.org/library/itertools.html @ permutations().
>> 
>> It writes:
>> 
>>    The number of items returned is n! / (n-r)! ...
>> 
>> The number should be n! / r!
>> 
>> Thanks,
>> Sander De Graaf
>> 
>> _______________________________________________
>> docs mailing list
>> docs at python.org
>> http://mail.python.org/mailman/listinfo/docs
> 
> 
> 
> -- 
> Thanks,
> Andrew Svetlov


More information about the docs mailing list