-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
addressed in next versionIssue is fixed and will appear in next published versionIssue is fixed and will appear in next published versionenhancement requestNew feature or requestNew feature or request
Description
Python 3.14 relaxes the syntax for except clauses that accept multiple exception types but do not use an as clause. Previously, parentheses were required in this case, but 3.14 eliminates this requirement.
def divide(a, b):
try:
result = a / b
return result
except ZeroDivisionError, TypeError: # No Parens needed here (unless there's an as clause)
print(f"Wrong input: {a} and {b}")
raiseSee PEP 758 for details.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
addressed in next versionIssue is fixed and will appear in next published versionIssue is fixed and will appear in next published versionenhancement requestNew feature or requestNew feature or request