bpo-32417: Make timedelta arithmetic respect subclasses by pganssle · Pull Request #10902 · python/cpython

vstinner

vstinner

vstinner

Previously timedelta would always return the `date` and `datetime`
types, regardless of what it is added to. This makes it return
an object of the type it was added to.

@pganssle

@pganssle

@pganssle

@pganssle

Fixes:
bpo-32417
bpo-35364
Addresses Victor's comments

gvanrossum

gvanrossum