Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
ufo
11y ago
0 comments
Save
Share
You should be able to do domething similar to the C example in most other languages with sane, lexical, variable scoping. Unfortunately, Python doesn't really play nice with nested scopes/functions so you are a bit out of luck here.
0 comments
1 comments · 1 top-level
top
newest
oldest
eru
11y ago
All comprehensions get their own scope in Python 3.
j
/
k
navigate · click thread line to collapse