-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
Closed
Labels
type-featureA feature request or enhancementA feature request or enhancement
Description
Feature or enhancement
Proposal:
try:
10 // 0
except ZeroDivisionError as e:
print(e) #returns integer division or modulo by zero
try:
10 / 0
except ZeroDivisionError as e:
print(e) #returns integer division by zero
try:
10 % 0
except ZeroDivisionError as e:
print(e) #returns integer modulo by zero
When floor dividing by zero the error says "division or modulo" but while (non-floor) dividing by zero or modulo-ing (?) it is more specific saying "division" or "modulo". I would recommend changing this to "floor division" or "division" because it would help with knowing what exactly the error is talking about.
Thank You!
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
No response
Linked PRs
Metadata
Metadata
Assignees
Labels
type-featureA feature request or enhancementA feature request or enhancement