diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2018-10-30 11:16:02 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-30 11:16:02 (GMT) |
commit | 95b6acf951fa7f503a3cc5ce7d969d7bcf2f95c9 (patch) | |
tree | 8f6c2e5a36ae932599e81ba3a226360ca59b19d7 /Misc/NEWS.d | |
parent | b83d917fafd87e4130f9c7d5209ad2debc7219cd (diff) | |
download | cpython-95b6acf951fa7f503a3cc5ce7d969d7bcf2f95c9.zip cpython-95b6acf951fa7f503a3cc5ce7d969d7bcf2f95c9.tar.gz cpython-95b6acf951fa7f503a3cc5ce7d969d7bcf2f95c9.tar.bz2 |
bpo-34876: Change the lineno of the AST for decorated function and class. (GH-9731)
It was overridden by the lineno of the first decorator. Now it is
the lineno of 'def' or 'class'.
Diffstat (limited to 'Misc/NEWS.d')
-rw-r--r-- | Misc/NEWS.d/next/Core and Builtins/2018-10-06-14-02-51.bpo-34876.oBKBA4.rst | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Core and Builtins/2018-10-06-14-02-51.bpo-34876.oBKBA4.rst b/Misc/NEWS.d/next/Core and Builtins/2018-10-06-14-02-51.bpo-34876.oBKBA4.rst new file mode 100644 index 0000000..4275c02 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2018-10-06-14-02-51.bpo-34876.oBKBA4.rst @@ -0,0 +1,6 @@ +The *lineno* and *col_offset* attributes of the AST for decorated function +and class refer now to the position of the corresponding ``def``, ``async +def`` and ``class`` instead of the position of the first decorator. This +leads to more correct line reporting in tracing. This is the only case when +the position of child AST nodes can preceed the position of the parent AST +node. |