Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
jules
on July 9, 2014
|
parent
|
context
|
favorite
| on:
Anti-Patterns in Python Programming
Even clearer:
x = [for word in words: for letter in word: letter]
This also has the advantage of being readable left to right without encountering any unbound identifiers like all other constructs in Python.
hueving
on July 10, 2014
[–]
As someone who spends a significant amount of time in python that is much harder to follow. There is an expectation for order in list comprehensions and what you wrote completely violates it.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: