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 isaiah
Recipients isaiah, lukasz.langa
Date 2018-05-15.19:45:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1526413502.34.0.682650639539.issue33520@psf.upfronthosting.co.za>
In-reply-to
Content
Thanks for the reply, that's quite reasonable, especially take the generator expression case into consideration. However I found this is not consistent with empty tuple:

>>> a = "()"                                                                                                                                                                                  
>>> ast.parse(a).body[0].value.col_offset                                                                                                                                                     
0

It's true that the parenthesis is required to construct a tuple, but if the parenthesis is served as the starting point of the tuple, then the col_offset should be the opening parenthesis. i.e. in the following example, both should start from col 2:

  >>> ast.parse("c(i for i in range(10))").body[0].value.args[0].col_offset
  2
  >>> ast.parse("c((i for i in range(10)))").body[0].value.args[0].col_offset
  3
History
Date User Action Args
2018-05-15 19:45:02isaiahsetrecipients: + isaiah, lukasz.langa
2018-05-15 19:45:02isaiahsetmessageid: <1526413502.34.0.682650639539.issue33520@psf.upfronthosting.co.za>
2018-05-15 19:45:02isaiahlinkissue33520 messages
2018-05-15 19:45:02isaiahcreate