Guido van Rossum wrote: > Hallo broer! :-) Yo :) > I wonder what this should mean then: > > def outer(): > def inner(): > x := 1 > > What is x's scope? UnboundVariableError: variable 'x' referenced before assignment Or a SyntaxError if the compiler can detect it. > Also, a := operator allows all sorts of left-hand sides that don't > necessarily make sense, e.g. > > x.foo := 1 > x[0] := 1 True, although maybe they could be made to make sense by defining special methods: __rebindattr__ __rebinditem__ <0.5 wink> Just
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