1. At least in my editor (PyCharm), I can collapse (fold) list comprehensions
just as easily as functions.
2. In this example the list comprehension already has a name - `clean_lines`.
Using a function actually forces me to come up with a second pointless name.
3. On the note of coming up with names, if I want to use a local function
(which I often do) then I also have to worry about names in two scopes
clashing, and might invent more pointless names.
_______________________________________________
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/SPWPNOCSZMOFAF45XYDCXD4MQR5LKXZO/
Code of Conduct: http://python.org/psf/codeofconduct/