summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2018-11-27 07:40:29 (GMT)
committerGitHub <noreply@github.com>2018-11-27 07:40:29 (GMT)
commitb619b097923155a7034c05c4018bf06af9f994d0 (patch)
treea9f0f2a6c1b2ef8ceccd02f18612e43dd5689420 /Misc
parentd1cbc6f8a00cf881ced6238c5e652054e8fdc30f (diff)
downloadcpython-b619b097923155a7034c05c4018bf06af9f994d0.zip
cpython-b619b097923155a7034c05c4018bf06af9f994d0.tar.gz
cpython-b619b097923155a7034c05c4018bf06af9f994d0.tar.bz2
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 'Misc')
-rw-r--r--Misc/NEWS.d/next/Core and Builtins/2018-11-21-14-05-51.bpo-31241.Kin10-.rst4
1 files changed, 4 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Core and Builtins/2018-11-21-14-05-51.bpo-31241.Kin10-.rst b/Misc/NEWS.d/next/Core and Builtins/2018-11-21-14-05-51.bpo-31241.Kin10-.rst
new file mode 100644
index 0000000..a859a9b
--- /dev/null
+++ b/Misc/NEWS.d/next/Core and Builtins/2018-11-21-14-05-51.bpo-31241.Kin10-.rst
@@ -0,0 +1,4 @@
+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.