Steven D'Aprano wrote:
With iterators being such a fundamental part of Python these days, perhaps one day we'll see the functions in the itertools module become iterator methods

I hope not. The set of potential functions that operate
on iterators is open-ended, and there's no reason to
single out a particular subset and make them methods.

Also, it would force all iterators to inherit from a
common base class in order to support those methods,
which is not a Pythonic thing to do.

Strings are different, because (a) they're a concrete
class, and (b) string methods benefit from having
access to implementation details of the string.

--
Greg
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to