[Python-ideas] globals should accept parenteses for extending beyond 1 line

João Matos jcrmatos at gmail.com
Mon Jan 23 14:22:38 EST 2017


Hello,

To me that makes no sense.
If for the import statement the rule is to use the parentheses and not 
repeating the import statement, why should it be different with global?

Best regards,

JM


On 23-01-2017 19:14, Guido van Rossum wrote:
> You can just write
>   global foo, bar
>   global baz, bletch
>
> On Mon, Jan 23, 2017 at 10:43 AM, João Matos <jcrmatos at gmail.com 
> <mailto:jcrmatos at gmail.com>> wrote:
>
>     Hello,
>
>     I would like to suggest that globals should follow the existing
>     rule (followed by the import statement, the if statement and in
>     other places) for extending beyond 1 line using parentheses.
>     Like this:
>     globals (var_1, var_2,
>         var_3)
>
>     instead of what must be done now, which is:
>     globals var_1, var_2 \
>         var_3
>
>
>     Best regards,
>
>     JM
>
>
>     _______________________________________________
>     Python-ideas mailing list
>     Python-ideas at python.org <mailto:Python-ideas at python.org>
>     https://mail.python.org/mailman/listinfo/python-ideas
>     <https://mail.python.org/mailman/listinfo/python-ideas>
>     Code of Conduct: http://python.org/psf/codeofconduct/
>     <http://python.org/psf/codeofconduct/>
>
>
>
>
> -- 
> --Guido van Rossum (python.org/~guido <http://python.org/%7Eguido>)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20170123/0590a298/attachment.html>


More information about the Python-ideas mailing list