summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorAnthony Sottile <asottile@umich.edu>2019-05-18 18:27:17 (GMT)
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-05-18 18:27:16 (GMT)
commitabea73bf4a320ff658c9a98fef3d948a142e61a9 (patch)
tree22acd64b07fa3dbfcbd30479900e9b4ca57f8f1e /Misc
parente917f2ed9af044fe808fc9b4ddc6c5eb99003500 (diff)
downloadcpython-abea73bf4a320ff658c9a98fef3d948a142e61a9.zip
cpython-abea73bf4a320ff658c9a98fef3d948a142e61a9.tar.gz
cpython-abea73bf4a320ff658c9a98fef3d948a142e61a9.tar.bz2
bpo-2180: Treat line continuation at EOF as a `SyntaxError` (GH-13401)
This makes the parser consistent with the tokenize module (already the case in `pypy`). sample ------ ```python x = 5\ ``` before ------ ```console $ python3 t.py $ python3 -mtokenize t.py t.py:2:0: error: EOF in multi-line statement ``` after ----- ```console $ ./python t.py File "t.py", line 3 x = 5\ ^ SyntaxError: unexpected EOF while parsing $ ./python -m tokenize t.py t.py:2:0: error: EOF in multi-line statement ``` https://bugs.python.org/issue2180
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/next/Core and Builtins/2019-05-17-18-34-30.bpo-2180.aBqHeW.rst1
1 files changed, 1 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Core and Builtins/2019-05-17-18-34-30.bpo-2180.aBqHeW.rst b/Misc/NEWS.d/next/Core and Builtins/2019-05-17-18-34-30.bpo-2180.aBqHeW.rst
new file mode 100644
index 0000000..a2207c1
--- /dev/null
+++ b/Misc/NEWS.d/next/Core and Builtins/2019-05-17-18-34-30.bpo-2180.aBqHeW.rst
@@ -0,0 +1 @@
+Treat line continuation at EOF as a ``SyntaxError`` by Anthony Sottile.