James Lu added the comment: I think you closed it too quickly. You see, computing the length of combinations() doesn't require looping all the way through the iterator; you can compute it quickly. I created a wrapper class just for this purpose.
On Sat, Jul 16, 2016 at 5:24 PM, R. David Murray <rep...@bugs.python.org> wrote: > > R. David Murray added the comment: > > If you read issue 24849, you will see that iterators having len was > rejected by Guido long ago. > > ---------- > nosy: +r.david.murray > > _______________________________________ > Python tracker <rep...@bugs.python.org> > <http://bugs.python.org/issue27532> > _______________________________________ > ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27532> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com