micropython/tests/cpydiff/core_fstring_parser.py
Damien George 11ed94797d py/lexer: Support nested [] and {} characters within f-string params.
Signed-off-by: Damien George <damien@micropython.org>
2021-11-25 21:50:58 +11:00

10 lines
334 B
Python

"""
categories: Core
description: f-strings cannot support expressions that require parsing to resolve unbalanced nested braces and brackets
cause: MicroPython is optimised for code space.
workaround: Always use balanced braces and brackets in expressions inside f-strings
"""
print(f'{"hello { world"}')
print(f'{"hello ] world"}')