[issue14544] Limit global keyword name conflicts in language spec to those enforced by CPython

2015-03-05 Thread Yongzhi Pan

Changes by Yongzhi Pan panyong...@gmail.com:


--
nosy: +fossilet

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14544
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14544] Limit global keyword name conflicts in language spec to those enforced by CPython

2015-03-05 Thread Raymond Hettinger

Raymond Hettinger added the comment:

+1 for the proposed change.   It should add there is also an enforced (and 
obvious) restriction that the variable not have been declared nonlocal.

--
nosy: +rhettinger

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14544
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14544] Limit global keyword name conflicts in language spec to those enforced by CPython

2015-03-05 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +ezio.melotti
stage:  - needs patch
versions: +Python 3.5 -Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14544
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14544] Limit global keyword name conflicts in language spec to those enforced by CPython

2012-04-13 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
nosy: +terry.reedy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14544
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14544] Limit global keyword name conflicts in language spec to those enforced by CPython

2012-04-10 Thread Nick Coghlan

New submission from Nick Coghlan ncogh...@gmail.com:

The language spec currently includes the following paragraph [1]:

   Names listed in a global statement must not be defined as
   formal parameters or in a for loop control target, class
   definition, function definition, or import statement.

While the first restriction is real (and enforced by CPython), since formal 
parameters are explicitly defined as local variables, there's no obvious 
rationale for the last 4 restrictions (and CPython doesn't enforce any of them).

The proposal is that the paragraph be simplified to:

   Names listed in a global statement must not also be defined as
   formal function parameters. Attempting to do so raises SyntaxError.

The current (incorrect!) CPython implementation detail note will be removed.

A similar clarification will also be made in the nonlocal statement 
documentation.

[1] http://docs.python.org/dev/reference/simple_stmts.html#the-global-statement

--
messages: 158005
nosy: ncoghlan
priority: normal
severity: normal
status: open
title: Limit global keyword name conflicts in language spec to those enforced 
by CPython
type: enhancement
versions: Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14544
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14544] Limit global keyword name conflicts in language spec to those enforced by CPython

2012-04-10 Thread Alex Gaynor

Alex Gaynor alex.gay...@gmail.com added the comment:

This shouldn't be a problem for PyPy, in fact I'm almost positive that we 
implement this already (since Django has a test that uses this feature).  
If/when the spec is changed please make sure there are tests for all these 
cases so we *know* it works though.

--
nosy: +alex

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14544
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14544] Limit global keyword name conflicts in language spec to those enforced by CPython

2012-04-10 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

Thread link: 
http://mail.python.org/pipermail/python-ideas/2012-April/014783.html

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14544
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14544] Limit global keyword name conflicts in language spec to those enforced by CPython

2012-04-10 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
nosy: +eric.araujo

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14544
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14544] Limit global keyword name conflicts in language spec to those enforced by CPython

2012-04-10 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14544
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com