Fix FORMAT_VALUE for values that have both a conversion and a format_spec.

Also output the conversion and flags in disassembly.
This commit is contained in:
Michael Hansen
2024-08-01 13:27:43 -07:00
parent 6ad3ceb67e
commit 0b45b5fa07
7 changed files with 38 additions and 34 deletions

Binary file not shown.

View File

@@ -28,10 +28,11 @@ print(f'{var3 * x} {var3:.2f} {var3:.5f} {x:02} {x*x:3} {x*x*x:4} {s1:>10} {a:x}
print(f'''some {{braces}} {"inner literal: {braces} {{double braces}}"}''')
print(f'''f-string dict {some_dict[2]} and {{function call in expression}}: {max([1,20,3])}''')
print(f'{(lambda x: x*2)(3)}')
print(f'{var3!s:4.5}')
msg = (
f'a {var1}'
f'cool'
f'multiline {var2}\n'
f'f-string {var3}'
)
print(f'{now:%Y-%m-%d %H:%M}')
print(f'{now:%Y-%m-%d %H:%M}')

View File

@@ -27,5 +27,6 @@ print ( f'{var3 * x} {var3:.2f} {var3:.5f} {x:02} {x * x:3} {x * x * x:4} {s1:>1
print ( f'some {{braces}} {\'inner literal: {braces} {{double braces}}\'}' ) <EOL>
print ( f'f-string dict {some_dict[2]} and {{function call in expression}}: {max([\n 1,\n 20,\n 3])}' ) <EOL>
print ( f'{(lambda x: x * 2)(3)}' ) <EOL>
print ( f'{var3!s:4.5}' ) <EOL>
msg = f'a {var1}coolmultiline {var2}\nf-string {var3}' <EOL>
print ( f'{now:%Y-%m-%d %H:%M}' ) <EOL>