Raymond Hettinger <rhettin...@users.sourceforge.net> added the comment:
Guido disallowed returning a len method on iterators. He expected bool(it) to be False. The recipes section of the itertools docs has code for combinations_with_replacement(). It was not included originally because it was unclear whether there was actually a need to generate them. Possibly, people are mainly interested in knowing how many there are but having no need to actually enumerate them. That being said, if I get more requests or if some real world use cases arise, I would be happy to C the recipe and add it in Py2.7. _______________________________________ 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