mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
bpo-46762: Fix an assert failure in f-strings where > or < is the last character if the f-string is missing a trailing right brace. (GH-31365)
(cherry picked from commit ffd9f8ff84)
Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
This commit is contained in:
parent
5b63ba3ff5
commit
3d407b9311
3 changed files with 14 additions and 10 deletions
|
|
@ -1053,6 +1053,8 @@ def test_mismatched_braces(self):
|
|||
"f'{{{'",
|
||||
"f'{{}}{'",
|
||||
"f'{'",
|
||||
"f'x{<'", # See bpo-46762.
|
||||
"f'x{>'",
|
||||
])
|
||||
|
||||
# But these are just normal strings.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue