[issue25180] Tools/parser/unparse.py needs to be updated for f-strings

Eric V. Smith report at bugs.python.org
Sun Sep 20 00:04:09 CEST 2015


Eric V. Smith added the comment:

This task is actually pretty difficult, and is going to require some major surgery to unparse.py.

Unfortunately, until it's fixed, you can't use f-strings in the stdlib or in stdlib tests.

Particularly challenging are nested f-strings like:
f'{f"{0}"*3}'

Getting the quoting right will be hard, and will likely require passing another parameter around to all of the dispatch functions. Or maybe just some local state, similar to the indent level (_indent) which is already being tracked.

----------
components: +Demos and Tools
nosy:  -python-dev

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25180>
_______________________________________


More information about the Python-bugs-list mailing list