cpython/Include
Nick Coghlan 6ca030765d
[3.8] bpo-37757: Disallow PEP 572 cases that expose implementation details (GH-15491)
- drop TargetScopeError in favour of raising SyntaxError directly
  as per the updated PEP 572
- comprehension iteration variables are explicitly local, but
  named expression targets in comprehensions are nonlocal or
  global. Raise SyntaxError as specified in PEP 572
- named expression targets in the outermost iterable of a
  comprehension have an ambiguous target scope. Avoid resolving
  that question now by raising SyntaxError. PEP 572
  originally required this only for cases where the bound name
  conflicts with the iteration variable in the comprehension,
  but CPython can't easily restrict the exception to that case
  (as it doesn't know the target variable names when visiting
  the outermost iterator expression)

(cherry picked from commit 5dbe0f59b7)
2019-08-26 00:41:47 +10:00
..
cpython
internal
abstract.h
asdl.h
ast.h
bitset.h
bltinmodule.h
boolobject.h
bytearrayobject.h
bytes_methods.h
bytesobject.h
cellobject.h
ceval.h
classobject.h
code.h
codecs.h
compile.h
complexobject.h
context.h
datetime.h
descrobject.h
dictobject.h
dtoa.h
dynamic_annotations.h
enumobject.h
errcode.h
eval.h
fileobject.h
fileutils.h
floatobject.h
frameobject.h
funcobject.h
genobject.h
graminit.h
grammar.h
import.h
interpreteridobject.h
intrcheck.h
iterobject.h
listobject.h
longintrepr.h
longobject.h
marshal.h
memoryobject.h
methodobject.h
modsupport.h
moduleobject.h
namespaceobject.h
node.h
object.h
objimpl.h
odictobject.h
opcode.h
osdefs.h
osmodule.h
parsetok.h
patchlevel.h
picklebufobject.h
py_curses.h
pyarena.h
pycapsule.h
pyctype.h
pydebug.h
pydtrace.d
pydtrace.h
pyerrors.h [3.8] bpo-37757: Disallow PEP 572 cases that expose implementation details (GH-15491) 2019-08-26 00:41:47 +10:00
pyexpat.h
pyfpe.h
pyhash.h
pylifecycle.h
pymacconfig.h
pymacro.h
pymath.h
pymem.h
pyport.h
pystate.h
pystrcmp.h
pystrhex.h
pystrtod.h
Python-ast.h
Python.h
pythonrun.h
pythread.h
pytime.h
rangeobject.h
setobject.h
sliceobject.h
structmember.h
structseq.h
symtable.h [3.8] bpo-37757: Disallow PEP 572 cases that expose implementation details (GH-15491) 2019-08-26 00:41:47 +10:00
sysmodule.h
token.h
traceback.h
tracemalloc.h
tupleobject.h
typeslots.h
ucnhash.h
unicodeobject.h
warnings.h
weakrefobject.h