A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-July/066939.html below:

[Python-Dev] 2.5 and beyond

[Python-Dev] 2.5 and beyond [Python-Dev] 2.5 and beyondPhillip J. Eby pje at telecommunity.com
Sun Jul 2 16:07:57 CEST 2006
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()

More information about the Python-Dev mailing list

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