At 07:27 28.10.2003 -0800, Guido van Rossum wrote: > It matches what the current global statement does, and it >makes it crystal clear that you *can* declare a variable in a specific >scope and assign to it without requiring there to be a binding for >that variable in the scope itself. EIBTI when comparing these two. looking at: x = 'global' def f(): def init(): global x in f x = 'in f' def g(): print x init() g() I don't really know whether to call explicit or implicit the fact that x in g is not the global one. And contrast with x = 'global' def f(): x = 0 def init(): global x x = 'in f' def g(): print x init() g() or consider x = 'global' def f(): global x def init(): global x in f x = 'in f' def g(): print x init() g()
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