On Tue, Apr 23, 2002, Guido van Rossum wrote: > > Changing LOAD_FAST so that > > x = 1 > def f(): > print x > x = 2 > print x > > prints 1 followed by 2 instead of raising UnboundLocalError would not > break existing code (except code relying on specific exceptions to be > raised -- but such code is always exempt from non-breakage > guarantees). -1 I agree with Jeremy that such code is by definition broken because it mixes global and local usage of the same variable within the same scope. That's a nightmare for visual inspection. BTW, the indentation came out bizarrely because you used a TAB char for indentation. Naughty, naughty. -- Aahz (aahz@pythoncraft.com) <*> http://www.pythoncraft.com/ What if there were no rhetorical questions?
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