New submission from Batuhan <batuhanosmantask...@gmail.com>:
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) '2+2).source' >>> source = "(2+2)[1]" >>> ast.get_source_segment(source, ast.parse(source).body[0].value) '2+2)[1]' I can prepare a patch to extend attribute's col_offset into parens if it is any if approved. ---------- components: Interpreter Core messages: 360844 nosy: BTaskaya, benjamin.peterson, pablogsal priority: normal severity: normal status: open title: col_offset for parenthesized expressions looks weird on attribute access versions: Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue39474> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com