mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +00:00
Closes issue 27921: Disallow backslashes anywhere in f-strings. This is a temporary restriction. In 3.6 beta 2, the plan is to again allow backslashes in the string parts of f-strings, but disallow them in the expression parts.
This commit is contained in:
parent
3b09cd64e0
commit
6a4efce7a5
6 changed files with 69 additions and 98 deletions
|
|
@ -138,10 +138,6 @@ class UnparseTestCase(ASTTestCase):
|
|||
# See issue 25180
|
||||
self.check_roundtrip(r"""f'{f"{0}"*3}'""")
|
||||
self.check_roundtrip(r"""f'{f"{y}"*3}'""")
|
||||
self.check_roundtrip(r"""f'{f"{\'x\'}"*3}'""")
|
||||
|
||||
self.check_roundtrip(r'''f"{r'x' f'{\"s\"}'}"''')
|
||||
self.check_roundtrip(r'''f"{r'x'rf'{\"s\"}'}"''')
|
||||
|
||||
def test_del_statement(self):
|
||||
self.check_roundtrip("del x, y, z")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue