circuitpython/tests/basics/string_fstring_debug.py.exp
Jim Mussared fb8792c095 py/lexer: Wrap in parenthesis all f-string arguments passed to format.
This is important for literal tuples, e.g.

    f"{a,b,}, {c}" --> "{}".format((a,b), (c),)

which would otherwise result in either a syntax error or the wrong result.

Fixes issue #9635.

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-01-20 17:54:32 +11:00

10 lines
151 B
Plaintext

x=1
x=00000001
a x=1 b 2 c
a x=00000001 b 2 c
a f() + g("foo") + h()=15 b
a f() + g("foo") + h()=0000000f b
a 1,=(1,) b
a x,y,=(1, 2) b
a x,1=(1, 1) b