]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.6] bpo-23894: make lib2to3 recognize f-strings (GH-1733) (#1737)
authorŁukasz Langa <lukasz@langa.pl>
Tue, 23 May 2017 05:23:29 +0000 (22:23 -0700)
committerGitHub <noreply@github.com>
Tue, 23 May 2017 05:23:29 +0000 (22:23 -0700)
commite8412e684ed741df246e8430f4911b31b0d8be1f
treee74ad5f426d1c5f4d8846575c4423c26b9800802
parentd29feccec3ce3dcd9ab3100f8956171c70ec3027
[3.6] bpo-23894: make lib2to3 recognize f-strings (GH-1733) (#1737)

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.
(cherry picked from commit 1b9530c536664276ce866ae602ce04adce0810e1)
Lib/lib2to3/pgen2/tokenize.py
Lib/lib2to3/tests/test_parser.py