At 05:40 AM 7/5/2006 -0400, Scott Dial wrote: >Guido van Rossum wrote: > > Would this also use ..num to refer to num in an outer scope two levels > removed? > >I realize this was a wink, but it is a valid problem with the >"dot"-proposal. Actually, it isn't. :) See below. >def foo(n): > def bar(n): > def baz(): > return .n > >So, which 'n' outer 'n' is being referenced? Notice that this is a made-up example. Existing Python scoping rules don't allow this! Thus your example is not a bug, it's a feature request. And I say we say "no" to adding this feature. ;-)
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