Comment by vram22
1 day ago
>Python seems to be the odd one out. Imo, its list comprehensions are confusing as hell to "newcomers". For example, when a list comprehension has multiple `for`s, what order are they nested in?
The order is mentioned right in the docs, for Python 3:
https://docs.python.org/3/tutorial/datastructures.html#list-...
>Note how the order of the for and if statements is the same in both these snippets.
And it is mentioned even more clearly in corresponding section in the Python 2 docs - last I checked, years ago,
Update: IOW, the nested list comprehension syntax is confusing only to newcomers or even experienced devs who are lazy or stupid enough to not read the docs for the language feature they want to use, before using it, IOW, "winging it", whether to try to seem cool or due to peer pressure or other reasons, all of which are stupid ones, even in the short term, because the cost is higher than the benefit in most cases.
"RTFM" could excuse literally any syntax decision in any language.
The hostility in your response to "lazy or stupid" devs is really funny given what a bad response it is.
[flagged]
[flagged]
[flagged]
1 reply →
[flagged]