Support 3.12 feature: PEP 701 – Syntactic formalization of f-strings #1136
Open
Description
opened on Sep 5, 2023
The following valid Python samples from https://peps.python.org/pep-0701/ running under 3.12.0rc1 will cause exceptions in YAPF.
-
bag = {'wand': 'Elder'} print(f'Magic wand: { bag['wand'] }')
-
source = 'a_file.py' print(f"{source.removesuffix(".py")}.c: $(srcdir)/{source}")
-
print(f"{f"{f"{f"{f"{f"{1+1}"}"}"}"}"}")
-
print(f"{'':*^{1:{1:{1}}}}")
-
x = 1 y = 2 print( f"___{ x }___" ) print( f"___{( y )}___" )
-
my_dict = {"key": "value"} print(f" something { my_dict["key"] } something else ")
Metadata
Assignees
Labels
No labels
Activity