mirror of
https://github.com/micropython/micropython.git
synced 2026-03-14 04:40:16 +01:00
py/lexer: Fix parsing of f'{{'.
Prior to this fix, f'{{' would raise a SyntaxError.
Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
@@ -31,6 +31,8 @@ print(f"a{ {0,1,2}}")
|
||||
|
||||
# PEP-0498 specifies that handling of double braces '{{' or '}}' should
|
||||
# behave like str.format.
|
||||
print(f'{{')
|
||||
print(f'}}')
|
||||
print(f'{{}}')
|
||||
print(f'{{{4*10}}}', '{40}')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user