We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7483b9f commit 0832b28Copy full SHA for 0832b28
graalpython/lib-python/3/datetime.py
@@ -2178,6 +2178,9 @@ def __add__(self, other):
2178
"Add a datetime and a timedelta."
2179
if not isinstance(other, timedelta):
2180
return NotImplemented
2181
+ # GraalPy change: if it's a subtype, use only the values, don't call into the possibly overridden addition
2182
+ if not type(other) is timedelta:
2183
+ other = timedelta(days=other.days, seconds=other.seconds, microseconds=other.microseconds)
2184
delta = timedelta(self.toordinal(),
2185
hours=self._hour,
2186
minutes=self._minute,
0 commit comments