> This would place a burden on all iterators to implement a large > and complex interface. This goes directly against the philosophy of > Python protocols, which is to be as minimal as possible. Do one thing, > and do it well. Agreed.
> And where do you stop? You've picked an arbitrary subset of things > one might want to do with an iterator. Why those particular ones? I've picked them arbitrarily for the example. > What about the contents of the itertools module? Should they be > included too? Why or why not? I imagine it to include those from itertools module too. And those from builtins like zip and enumerate. If you ask me why, I guess one way I reason about this is that these are what I think an iterator should be able to do (at the expense of a bloated class). _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/GVW72B3SPAAGC6XL3QGGVPYUZY2N3AHR/ Code of Conduct: http://python.org/psf/codeofconduct/