bpo-37070: Cleanup fstring debug handling (GH-13607)

* Clean up some comments, fix potential memory leaks, clarify literal and expr_text.
This commit is contained in:
Eric V. Smith 2019-05-29 03:55:44 -04:00 committed by GitHub
parent 0ae022c6a4
commit f83d1dbd3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 27 deletions

View file

@ -284,6 +284,7 @@ class AnnotationsFutureTestCase(unittest.TestCase):
eq("(x:=10)")
eq("f'{(x:=10):=10}'")
def test_fstring_debug_annotations(self):
# f-strings with '=' don't round trip very well, so set the expected
# result explicitely.
self.assertAnnotationEqual("f'{x=!r}'", expected="f'x={x!r}'")