Serhiy Storchaka added the comment:

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.

----------
nosy: +eric.smith, serhiy.storchaka

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue30465>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to