[issue17815] itertools.combinations example is overly complicated

2013-04-22 Thread Theodoros Ikonomou
Changes by Theodoros Ikonomou : -- resolution: -> postponed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailin

[issue17815] itertools.combinations example is overly complicated

2013-04-22 Thread Theodoros Ikonomou
New submission from Theodoros Ikonomou: I find the code presented as equivalent for itertools.combinations is overly complex. I think we can change it to something easier like the following: def combinations(iterable, r): i, size = 0, len(iterable) while i + r - 1 < size: subind