summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBatuhan Taşkaya <47358913+isidentical@users.noreply.github.com>2019-05-20 20:27:10 (GMT)
committerGuido van Rossum <guido@python.org>2019-05-20 20:27:10 (GMT)
commit4011d865d0572a3dd9988f2935cd835cc8fb792a (patch)
tree93ea5715395f54d250ba5b58e66fc951607e9c47
parentc09a9f56c08d80567454cae6f78f738a89e1ae94 (diff)
downloadcpython-4011d865d0572a3dd9988f2935cd835cc8fb792a.zip
cpython-4011d865d0572a3dd9988f2935cd835cc8fb792a.tar.gz
cpython-4011d865d0572a3dd9988f2935cd835cc8fb792a.tar.bz2
bpo-23896: Add a grammar where exec isn't a stmt (#13272)
https://bugs.python.org/issue23896
-rw-r--r--Lib/lib2to3/pygram.py3
-rw-r--r--Misc/ACKS1
-rw-r--r--Misc/NEWS.d/next/Library/2019-05-13-05-49-15.bpo-23896.8TtUKo.rst2
3 files changed, 6 insertions, 0 deletions
diff --git a/Lib/lib2to3/pygram.py b/Lib/lib2to3/pygram.py
index 919624e..24d9db9 100644
--- a/Lib/lib2to3/pygram.py
+++ b/Lib/lib2to3/pygram.py
@@ -36,5 +36,8 @@ python_symbols = Symbols(python_grammar)
python_grammar_no_print_statement = python_grammar.copy()
del python_grammar_no_print_statement.keywords["print"]
+python_grammar_no_print_and_exec_statement = python_grammar_no_print_statement.copy()
+del python_grammar_no_print_and_exec_statement.keywords["exec"]
+
pattern_grammar = driver.load_packaged_grammar("lib2to3", _PATTERN_GRAMMAR_FILE)
pattern_symbols = Symbols(pattern_grammar)
diff --git a/Misc/ACKS b/Misc/ACKS
index f9d01d0..87107b9 100644
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -1860,3 +1860,4 @@ Carsten Klein
Diego Rojas
Edison Abahurire
Geoff Shannon
+Batuhan Taskaya
diff --git a/Misc/NEWS.d/next/Library/2019-05-13-05-49-15.bpo-23896.8TtUKo.rst b/Misc/NEWS.d/next/Library/2019-05-13-05-49-15.bpo-23896.8TtUKo.rst
new file mode 100644
index 0000000..3c15482
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2019-05-13-05-49-15.bpo-23896.8TtUKo.rst
@@ -0,0 +1,2 @@
+Adds a grammar to lib2to3.pygram that contains exec as a function not as
+statement.