Debugging Python f-string errors April 26, 2025
Today, I encountered a fun bug where
f"{x}"
threw a TypeError, but str(x)
worked. Join me on my journey unravelling what f-strings do and uncovering the mystery of why an object might not be what it seems.