I agree that it should be a SyntaxError as it's a semantic issue regarded to
syntax. For instance, we already use SyntaxError for when a `return` statement
is outside of a function and I view this as the same sort of error. And I think
with an appropriately descriptive message like Ivan pointed out will handle
any confusion, especially since this exception will very rarely be caught and
if it is it very likely won't be caught _just_ for the walrus operator and no
other syntax-related error.
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at
https://mail.python.org/archives/list/python-dev@python.org/message/WJ6YQSFWO6JPJEMWA6FJSWOA4VK4R4RF/