New submission from Konrad <kon...@gmail.com>: The function itertools.combinations might benefit from making the 'r' (length of the combinations) argument optionally a sequence.
With that change one could call combinations(sequence, [2, 3]) in order to get all combinations of length 2 and 3. In particular, one could call combinations(sequence, range(len(sequence)) in order to get *all* combinations of given sequence. The change would be backwards compatible as it would check for sequential arguments. ---------- components: Library (Lib) messages: 80492 nosy: konryd, rhettinger severity: normal status: open title: Extending itertools.combinations type: feature request _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue5048> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com