bpo-43149: Correct the syntax error message for multiple exception types (GH-25996) GH-25997)
Automerge-Triggered-By: GH:pablogsal
(cherry picked from commit 6692dc1ca99fb34a19d0a4b93cf8e10619490001)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
diff --git a/Lib/test/test_syntax.py b/Lib/test/test_syntax.py
index 9799697..5840721 100644
--- a/Lib/test/test_syntax.py
+++ b/Lib/test/test_syntax.py
@@ -1068,7 +1068,7 @@
...
SyntaxError: invalid syntax
-Check that an exception group with missing parentheses
+Check that an multiple exception types with missing parentheses
raise a custom exception
>>> try:
@@ -1076,21 +1076,21 @@
... except A, B:
... pass
Traceback (most recent call last):
- SyntaxError: exception group must be parenthesized
+ SyntaxError: multiple exception types must be parenthesized
>>> try:
... pass
... except A, B, C:
... pass
Traceback (most recent call last):
- SyntaxError: exception group must be parenthesized
+ SyntaxError: multiple exception types must be parenthesized
>>> try:
... pass
... except A, B, C as blech:
... pass
Traceback (most recent call last):
- SyntaxError: exception group must be parenthesized
+ SyntaxError: multiple exception types must be parenthesized
>>> try:
... pass
@@ -1099,7 +1099,7 @@
... finally:
... pass
Traceback (most recent call last):
- SyntaxError: exception group must be parenthesized
+ SyntaxError: multiple exception types must be parenthesized
>>> f(a=23, a=234)