> The builtin interables bytearray, bytes, enumerate, filter frozenset, map, 
> memoryview, range, reversed, tuple and zip suggest differently.

enumerate, filter, map, range, reversed and zip don't apply because they're not 
collections, you wouldn't be able to store the result of the computation 
anywhere. bytes comprehensions would make sense if string comprehensions are 
added. This leaves us with bytearray, frozenset and memoryview. How often are 
these used compared to strings, dicts, and lists?

> If we were re-designing Python from scratch today, it is quite likely that we 
> would have only generator comprehensions

I don't know about this, but unless everything besides generator expressions 
get deprecated the current comprehensions are here to stay and string 
comprehensions would fit perfectly alongside them (this is my opinion).
_______________________________________________
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/JAGVQPSYUJAMVH4LCMLA6GJDH55ET2JJ/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to