However, using an f-string with a byte string is a syntax error:
>>> bf"y={a}"
File "<stdin>", line 1
bf"y={a}"
^^^^^^^
SyntaxError: invalid syntax
(In this particular case f"y={a}".encode("utf-8") would work, but that's longer and doesn't always work correctly if there are byte literals in my string.)
The following code triggers an FS001 error:
However, using an f-string with a byte string is a syntax error:
(In this particular case
f"y={a}".encode("utf-8")
would work, but that's longer and doesn't always work correctly if there are byte literals in my string.)