Skip: > scope: > l = [i**2 for i in range(10)] By analogy with C, the introducer of a new scope should simply be an unadorned colon: : l = [i**2 for i in range(10)] :-) While this might be useful, it doesn't really address the issue raised, because we really need a new scope per listcomp (or maybe even each 'for' in the listcomp). > There's also the problem of how to export results from the scope, though > perhaps the new nested scope stuff provides a solution to that. Nope -- there's still no way to assign to any name in an intermediate scope. Something heretical, such as declarations, would be needed. Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | A citizen of NewZealandCorp, a | Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. | greg@cosc.canterbury.ac.nz +--------------------------------------+
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