Feature or enhancement
After 6bc65c3 is merged, there's one more case we can handle. See this todo:
|
>>> # TODO(@sobolevn): improve this message in the next PR |
|
>>> assert a := 1 |
|
Traceback (most recent call last): |
|
SyntaxError: invalid syntax |
What happens? assert does not allow := without () in its body.
We need to improve the error message, because current state is not really clear for the user. Why there's a syntax error? How to fix it?
Refs #136616
Linked PRs
Feature or enhancement
After 6bc65c3 is merged, there's one more case we can handle. See this todo:
cpython/Lib/test/test_syntax.py
Lines 2693 to 2696 in 6bc65c3
What happens?
assertdoes not allow:=without()in its body.We need to improve the error message, because current state is not really clear for the user. Why there's a syntax error? How to fix it?
Refs #136616
Linked PRs
assert a := bsyntax error message #138718