On 23/11/21 3:15 am, Remy wrote:
Iterators to implement 'transformational' functions like map, filter, flat_map, 
'reductional' functions like reduce, sum, join, and 'evaluate' functions like 
to_list and to_set.

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.

It would also be a huge backwards-incompatible change.

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?
What about the contents of the itertools module? Should they be
included too? Why or why not?

--
Greg

_______________________________________________
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/JNFVFZT22ZMPAEHH2VG5NEHI3LAC33IB/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to