Author tim.peters
Recipients David Radcliffe, FR4NKESTI3N, josh.r, jwilk, kellerfuchs, mark.dickinson, pablogsal, rhettinger, serhiy.storchaka, steven.daprano, tim.peters
Date 2019-06-03.03:46:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I'm not fatally opposed to relaxing k <= n.  David makes some good points about it, and - as Raymond already noted - "0" is consistent with the behavior of itertools.combinations().

The docs would need to change, though, because the factorial "definition" would no longer make sense.  Defining it in terms of the falling factorial would, but that's too obscure for Python's audience.  Probably a combinatorial definition would be best:  `comb(n, k) is the number of k-element subsets of an n-element set".  Then it's clear that n and k are cardinals (integers >= 0), and that the result is 0 when k > n.
Date User Action Args
2019-06-03 03:46:26tim.peterssetrecipients: + tim.peters, rhettinger, mark.dickinson, jwilk, steven.daprano, serhiy.storchaka, josh.r, pablogsal, kellerfuchs, FR4NKESTI3N, David Radcliffe
2019-06-03 03:46:26tim.peterssetmessageid: <>
2019-06-03 03:46:26tim.peterslinkissue35431 messages
2019-06-03 03:46:26tim.peterscreate