|
As @serhiy-storchaka suggested, I have moved the default cause of the switch outside so the compiler now emits warnings if there are missing cases. For example: |
There was a problem hiding this comment.
nitpick: I prefer the current "default:" case coding style :-)
There was a problem hiding this comment.
The advantage of having it outside the switch is that the compiler complains about missing cases. Check my previous comment and Serhiy's suggestion in the bpo
There was a problem hiding this comment.
Why not add it to exec_tests or single_tests?
There was a problem hiding this comment.
I was afraid that the diff will be very difficult to read because the regenerated exec_results, but it turned out to be very simple. I have added the test to exec_results instead of creating a new extra_validation_snippets.
3fd32ec to
b71484a
Compare
| # Decorator with generator argument | ||
| "@deco(a for a in b)\ndef f(): pass", | ||
| # Simple assignment expression | ||
| "if a:=1:\n True" |
There was a problem hiding this comment.
Minimal example: "(a := 1)".
https://bugs.python.org/issue36332