22.02.20 09:43, David Mertz пише:
Comprehension are very much based on the idea of *declarative* data collections. That's their entire reason for being. In general, one expects comprehension to be side-effect free and just build a collection according to declared rules. Obviously I know many ways to smuggle in side effects, but doing so goes against their spirit and user expectations.

A comprehension should read as one line. At very least logically, but usually physically. If I ever find myself wiring a comprehension longer than about 120 characters, I know it's time to refactor into a function and block loops. I've cleaned up far too much code that used too-complex nested comprehension.

Everything about this proposal is antithetical to the intention of comprehension.

I concur with David.
_______________________________________________
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/EE3WPRKSPU4WRTXAD6P53T62BXCTFIOB/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to