Found something interesting out the hard way. #Python
from string import Formatter
a = 0
b = 1
print(f"{a or b}") # Works
print("{a or b}".format(a=0, b=1)) # Does not work
print(Formatter().format("{a or b}", a=0, b=1)) # Does not work
David Zaslavsky
in reply to Neil E. Hodges • • •