Re: Proposal: Complex comprehensions containing statements

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.

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.
participants (2)
-
Alex Hall
-
Dominik Vilsmeier