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

[Python-Dev] replacing 'global'

[Python-Dev] replacing 'global' [Python-Dev] replacing 'global'Alex Martelli aleaxit at yahoo.com
Sun Oct 26 06:35:41 EST 2003
On Sunday 26 October 2003 11:42, Skip Montanaro wrote:
   ...
> might need to remember the same discipline all the time.  It seems that
> use of
>         x := 2
>       and
>         x = 4
>       should be disallowed in the same function so that the compiler can
>       flag such mistakes.

I entirely agree with you.  There is no good use case that I can see for
this mixture, and prohibiting it helps the compiler help the programmer.


>     * This seems like a statement which mixes declaration and execution.

That's actually the PLAIN assignment statement, which mixes assigning
a value with telling the compiler "this name is local" (other binding 
statements such as def, class etc also do that).


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