Hi Jonathan,

Does this global/nonlocal prefix idea of yours allow us to do anything 
new that we can't do now?

At first glance, it looks like all it will do is increase the complexity 
of the language, making it harder for the interpreter and third party 
tools to identify globals, without any increased functionality.

Is the only benefit here that you save one line of code?

    global a
    a = 3

versus

    global a = 3

Also, you should be aware that although CPython doesn't enforce this 
rule, the language documentation does state that global "must not" be 
used for loop variables, classes, functions, etc:

https://docs.python.org/3/reference/simple_stmts.html#grammar-token-python-grammar-global_stmt

The bottom line is this:

Aside from the saving of one line of code, how would this improve the 
language?


-- 
Steve
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/POR3MYI7IF7IF5PMZIAKURNOACHRPIOG/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to