Ezio Melotti <ezio.melo...@gmail.com> added the comment: itertools.permutations_with_repetitions(iterable[, r]) is not necessary, writing in the doc that set(itertools.permutations(iterable[, r])) has the same result is probably enough (I put the set() in the wrong place in the previous message - this version is also less efficient because it has to generate duplicate elements that will be removed by set()). I suggested to include math.npermutations_with_repetitions for completeness, even if it's not widely used IMHO is not coherent to have formulas to calculate combinations with and without repetitions and a just a formula for permutations without repetitions.
_______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue5139> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com