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/2003-October/039516.html below:

[Python-Dev] replacing 'global'

[Python-Dev] replacing 'global' [Python-Dev] replacing 'global'Alex Martelli aleaxit at yahoo.com
Sat Oct 25 18:38:32 EDT 2003
On Sunday 26 October 2003 12:20 am, Guido van Rossum wrote:
> > One thing that I've always wondered about, why can't one do:
> >
> >         def reset_foo():
> >             global foo = []     # declare as global and do assignment
>
> Nothing deep -- it just never occurred to me.  I was mimicking ABC's
> "SHARE foo", which doesn't have this because its syntax for assignment
> is the more verbose "PUT value IN variable".
>
> I don't think it'll entice Alex though. :-)

Ah, you haven't seen my answer to it?  I think it meets most of my
objections -- all but the distaste for the keyword 'global' itself -- and
I could definitely live with this more happily than with any other use
of 'global'.  Please see my direct response to Neal for more details.


Alex


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