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/039632.html below:

[Python-Dev] replacing 'global'

[Python-Dev] replacing 'global' [Python-Dev] replacing 'global'Samuele Pedroni pedronis at bluewin.ch
Mon Oct 27 12:23:28 EST 2003
At 07:11 27.10.2003 -0800, Guido van Rossum wrote:

>I'm *not* saying that I like := (so far I still like 'global x in f'
>better)

if I understand 'global x in f' will introduce a local x in f even if there
is none, for symmetry with global. Maybe this has already been answered
(this thread is getting too long, and is this change scheduled for 2.4 or 
3.0?) but

x = 'global'

def f():
   def init():
     global x in f
     x = 'in f'
   init()
   print x

f()

will this print 'global' or 'in f' ? I can argument both ways which is not 
a good thing.

Thanks. 


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