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

[Python-Dev] replacing 'global'

[Python-Dev] replacing 'global' [Python-Dev] replacing 'global'Just van Rossum just at letterror.com
Sun Oct 26 06:35:09 EST 2003
Skip Montanaro wrote:

>     >> * Would you be required to use := at each assignment or just
>     >> the first?
> 
> Just> Just the first; "a = 2" still means "a is local to this scope".
> 
> That seems like a very subtle error waiting to happen...

Since I said the wrong thing, I'm not sure how to respond to this... Do
you still feel the same way with my corrected reply?

>     >> * This seems like a statement which mixes declaration and
>     >> execution.
> 
> Just> How is that different from "regular" assignment? It mixes
> Just> declaration and execution in the same way.
>
> Not in the way of saying, "this is global and here's its value".

In a way := is the opposite of "this is local and here's its value". It
says: "this is defined _somewhere_ and here's its new value".

Just

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