New to python. I am getting:
Invalid syntax line 1
I understand that the fstring error can show up on line one. These lines are pretty much taken from this page in the python docs. There is syntax I am unfamiliar with {err=}
. I tried searching but the =
is so ubiquitous it's like a needle in a haystack.
What is wrong with what is below? I assume it is somehow connected to the =
. If I remove the =
then the error flag goes away.
What does the =
do?
The two places that use this error handling look like this:
except BaseException as err:
print(f"Shadow retrieval exception: {err=}, {type(err)=}")
and
except BaseException as err:
print(f"Unexpected {err=}, {type(err)=}")