bpo-43149: Improve error message for exception group without parentheses#24467
bpo-43149: Improve error message for exception group without parentheses#24467pablogsal merged 1 commit intopython:masterfrom
Conversation
| ... | ||
| SyntaxError: invalid syntax | ||
|
|
||
| Check that an exception group with missing parentheses |
There was a problem hiding this comment.
This terminology conflicts with PEP 654 exception groups
cc @iritkatriel
There was a problem hiding this comment.
Thanks for pointing that out. If exceptions group pep is merged we will surely change this sentence.
On the other hand, do you have some alternative phasing for the error you think would be clearer?
There was a problem hiding this comment.
isinstance calls this thing a classinfo
There was a problem hiding this comment.
There was a problem hiding this comment.
Unfortunately I find that even more confusing :(
There was a problem hiding this comment.
I started a mailing list thread in python-dev@python.org "a name for the ExceptHandler.type when it is a literal tuple of types"
There was a problem hiding this comment.
@iritkatriel yeah I like it: SyntaxError: multiple exception types must be parenthesized
https://bugs.python.org/issue43149