At 01:58 PM 7/2/2006 +0200, jan-python at maka.demon.nl wrote: >I believe the problem has nothing to do with how many scopes a block/function >definition has, but with what the lambda does with the scope it's given. >Currently it remembers the block and looks up the nescessary variables in it >when it's invoked. I think it shoud should have just taken the values of the >needed variables and rememberd those as it's own local variables. So >the closed >over variables become just local variables initialised to the value >they have in >the outer scope. That won't work. Consider this code, that's perfectly valid Python today: def foo(): def bar(): print x for x in range(10): bar()
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