[issue4816] Patch of itertools.{combinations, permutations} for empty combinations

Raymond Hettinger report at bugs.python.org
Wed Jan 7 23:53:06 CET 2009


Raymond Hettinger <rhettinger at users.sourceforge.net> added the comment:

Excel is returning the count, not the set itself.  So, it could have
chosen to return zero.

The HP32SII also has nCr and nPr functions that return INVALID DATA for
r>n or r<0.

The Combinatorics section of CRC Standard Mathematical Formulae (30th
edition) defines nCr and nPr only for 0 <= r <= n.  The same is true in
Harris and Stocker's Handbook of Mathematics and Computational science.

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4816>
_______________________________________


More information about the Python-bugs-list mailing list