]> granicus.if.org Git - python/commit
bpo-23894: make lib2to3 recognize f-strings (#1733)
authorŁukasz Langa <lukasz@langa.pl>
Mon, 22 May 2017 23:35:48 +0000 (16:35 -0700)
committerGitHub <noreply@github.com>
Mon, 22 May 2017 23:35:48 +0000 (16:35 -0700)
commit1b9530c536664276ce866ae602ce04adce0810e1
tree6037af92088bd6818e873bb2a424d226ef0842db
parentddbfa2c35b298a56f0b813656745bca9cb7334f1
bpo-23894: make lib2to3 recognize f-strings (#1733)

Note: this doesn't unpack f-strings into the underlying JoinedStr AST.

Ideally we'd fully implement JoinedStr here but given its additional
complexity, I think this is worth bandaiding as is. This unblocks tools like
https://github.com/google/yapf to format 3.6 syntax using f-strings.
Lib/lib2to3/pgen2/tokenize.py
Lib/lib2to3/tests/test_parser.py