diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2018-11-27 09:40:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-27 09:40:29 +0200 |
commit | b619b097923155a7034c05c4018bf06af9f994d0 (patch) | |
tree | a9f0f2a6c1b2ef8ceccd02f18612e43dd5689420 /Lib/test/test_exceptions.py | |
parent | d1cbc6f8a00cf881ced6238c5e652054e8fdc30f (diff) | |
download | cpython-b619b097923155a7034c05c4018bf06af9f994d0.tar.gz cpython-b619b097923155a7034c05c4018bf06af9f994d0.zip |
bpo-31241: Fix AST node position for list and generator comprehensions. (GH-10633)
The lineno and col_offset attributes of AST nodes for list comprehensions,
generator expressions and tuples are now point to the opening parenthesis or
square brace. For tuples without parenthesis they point to the position
of the first item.
Diffstat (limited to 'Lib/test/test_exceptions.py')
-rw-r--r-- | Lib/test/test_exceptions.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py index 53532488008..6ef529e2b01 100644 --- a/Lib/test/test_exceptions.py +++ b/Lib/test/test_exceptions.py @@ -204,7 +204,7 @@ class ExceptionTests(unittest.TestCase): check('x = 0o9', 1, 6) # Errors thrown by symtable.c - check('x = [(yield i) for i in range(3)]', 1, 6) + check('x = [(yield i) for i in range(3)]', 1, 5) check('def f():\n from _ import *', 1, 1) check('def f(x, x):\n pass', 1, 1) check('def f(x):\n nonlocal x', 2, 3) |