This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author BTaskaya
Recipients BTaskaya, benjamin.peterson, pablogsal
Date 2020-01-28.08:41:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Python 3.9.0a2+ (heads/master:65ecc390c1, Jan 26 2020, 15:39:11) 
[GCC 9.2.1 20191008] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ast
>>> source = "(2+2).source"
>>> ast.get_source_segment(source, ast.parse(source).body[0].value)
>>> source = "(2+2)[1]"
>>> ast.get_source_segment(source, ast.parse(source).body[0].value)

I can prepare a patch to extend attribute's col_offset into parens if it is any if approved.
Date User Action Args
2020-01-28 08:41:48BTaskayasetrecipients: + BTaskaya, benjamin.peterson, pablogsal
2020-01-28 08:41:48BTaskayasetmessageid: <>
2020-01-28 08:41:48BTaskayalinkissue39474 messages
2020-01-28 08:41:48BTaskayacreate