[issue37671] itertools.combinations could be lazier

2019-07-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thank you for the suggestion, but I'm going to decline for the reasons articulated in the link. Consider posting you code to the Python package index where others can use if the need arises. -- resolution: -> rejected stage: -> resolved status:

[issue37671] itertools.combinations could be lazier

2019-07-24 Thread Antal Nemes
Antal Nemes added the comment: Thanks for sharing the discussion above. I did not know this was discussed earlier. Indeed, I do not come from a real world example. I ran into this problem while solving an online coding challenge that also measures performance. I got the right answer, just t

[issue37671] itertools.combinations could be lazier

2019-07-24 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: See also related discussion https://bugs.python.org/msg276855 -- nosy: +xtreak ___ Python tracker ___ _

[issue37671] itertools.combinations could be lazier

2019-07-24 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue37671] itertools.combinations could be lazier

2019-07-24 Thread Antal Nemes
New submission from Antal Nemes : Reproducible with current master (3.9, 151b91dfd21a100ecb1eba9e293c0a8695bf3bf5) I would expect itertools.combinations to be lazy in the sense that it should not exhaust the input iterator in constructor time. import itertools; itertools.combinations(itertool