From: "Gerald S. Williams" <gsw@agere.com> > I don't want to rehash any old discussions, but I came across a surprise > recently while converting constructs like "map(lambda x:x+1,x)" and just > wanted to see the rationale behind not creating a local scope for list > comprehension variables. The idea was to make a = [expr(i) for i in seqn]; print i behave the same as: a = [] for i in seqn: a.append(expr(i)) print i # i is in locals in its final loop state Raymond Hettinger
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4