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/2005-April/053002.html below:

[Python-Dev] Re: anonymous blocks vs scope-collapse

[Python-Dev] Re: anonymous blocks vs scope-collapse [Python-Dev] Re: anonymous blocks vs scope-collapsePaul Moore p.f.moore at gmail.com
Tue Apr 26 23:40:27 CEST 2005
On 4/26/05, Jim Jewett <jimjjewett at gmail.com> wrote:
> I'm not sure I understand this.  The preferred way would be
> to just stick the keyword before the call.  Using 'collapse', it
> would look like:
> 
>     def foo(b):
>         c=a
>     def bar():
>         a="a1"
>         collapse foo("b1")
>         print b, c        # prints "b1", "a1"
>         a="a2"
>         foo("b2")        # Not collapsed this time
>         print b, c        # still prints "b1", "a1"

*YUK* I spent a long time staring at this and wondering "where did b come from?"

You'd have to come up with a very compelling use case to get me to like this.

Paul.
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