You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that a typecheck can be added as suggested by the existing comment
def__new__(cls, days=0, seconds=0, microseconds=0,
milliseconds=0, minutes=0, hours=0, weeks=0):
# Doing this efficiently and accurately in C is going to be difficult
...
# XXX Check that all inputs are ints or floats.
Currently, an error is raised, but it's not explicit that it's because of an argument of wrong type
_pydatetime.timedelta(seconds='1')
# TypeError: can only concatenate str (not "int") to str
If this type check is not desirable, I think we can simply remove the comment.
Feature or enhancement
Proposal:
It seems that a typecheck can be added as suggested by the existing comment
Currently, an error is raised, but it's not explicit that it's because of an argument of wrong type
If this type check is not desirable, I think we can simply remove the comment.
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response
Linked PRs
The text was updated successfully, but these errors were encountered: