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 serhiy.storchaka
Recipients eric.smith, lukasz.langa, rhettinger, serhiy.storchaka
Date 2017-05-31.18:58:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1496257119.97.0.215748261294.issue30465@psf.upfronthosting.co.za>
In-reply-to
Content
I have concerns about following cases.

* f-string containing multiple equivalent subexpressions:

f'{x} {x}'

or

f'''
{x}
{x}
'''

* f-string containing escaped newlines:

f'''\
\
{x}\
\
'''

The tests look slightly verbose and fragile to me. If once the parser will produce more efficient tree (see issue26415), the tests may fail. Needed more tests (for cases mentioned above), and adding them will add more verbose code. Maybe just find the child (or several children) of specific type and check lineno and col_offset only for it and few its children? If this will make the tests simpler. But if tests can't be made simpler, we should live with this.
History
Date User Action Args
2017-05-31 18:58:40serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger, eric.smith, lukasz.langa
2017-05-31 18:58:39serhiy.storchakasetmessageid: <1496257119.97.0.215748261294.issue30465@psf.upfronthosting.co.za>
2017-05-31 18:58:39serhiy.storchakalinkissue30465 messages
2017-05-31 18:58:39serhiy.storchakacreate