[issue5139] Add combinatoric counting functions to the math module.

Mark Dickinson report at bugs.python.org
Tue Feb 3 12:50:02 CET 2009


Mark Dickinson <dickinsm at gmail.com> added the comment:

I agree that the names shouldn't clash with those in math, especially
since it seems quite plausible that a user might want to use both
itertools.combinations and math.combs (for example) in the same script.

No strong feelings about the actual names, but it would be nice if they
somehow conveyed the idea of counting rather than enumerating.  That is,
if it weren't for the clearly ridiculous length, it would be nice to have:

itertools.combinations
itertools.permutations

and

math.number_of_combinations
math.number_of_permutations

etc.

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


More information about the Python-bugs-list mailing list