[issue14831] make r argument on itertools.combinations() optional

2012-05-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: permutations(i,r) has an obvious default length, len(i). For combinations(i,r), r = len(i), the return is i itself. Uninteresting. You are asking for something else, that combinations(i) be powerset(i), which is a different function. Powerset can be built fro

[issue14831] make r argument on itertools.combinations() optional

2012-05-16 Thread Dirkjan Ochtman
Dirkjan Ochtman added the comment: [[], [0], [1], [2], [0, 1], [0, 2], [1, 2], [0, 1, 2]] That is, all possible combinations. -- ___ Python tracker ___

[issue14831] make r argument on itertools.combinations() optional

2012-05-16 Thread Mark Dickinson
Mark Dickinson added the comment: Wait, what? What results are you proposing for e.g., list(combinations(range(3))) ? None of the obvious defaults for r (length of first argument? 0? 1?) look very interesting. -- nosy: +mark.dickinson ___ Pytho

[issue14831] make r argument on itertools.combinations() optional

2012-05-16 Thread Dirkjan Ochtman
Changes by Dirkjan Ochtman : -- versions: +Python 3.2 -Python 3.3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue14831] make r argument on itertools.combinations() optional

2012-05-16 Thread Dirkjan Ochtman
Changes by Dirkjan Ochtman : -- components: +Library (Lib) versions: +Python 3.3 ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue14831] make r argument on itertools.combinations() optional

2012-05-16 Thread Dirkjan Ochtman
New submission from Dirkjan Ochtman : I'm not sure why this is allowed for permutations() but not combinations(). -- messages: 160874 nosy: djc priority: normal severity: normal status: open title: make r argument on itertools.combinations() optional