Escape sequences are decoded like in ordinary string literals (except when a literal is also marked as a raw string). After decoding, the grammar for the contents of the string is:followed by lots of stuff, followed by
Backslashes are not allowed in format expressions and will raise an error:
f"newline: {ord('\n')}" # raises SyntaxError
Like all raw strings in Python, no escape processing is done for raw f-strings: