Author p-ganssle
Recipients p-ganssle
Date 2017-08-16.17:01:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In the .py implementation of datetime.replace (and date.replace and time.replace), the new datetime is created using the datetime type:

But in the C source, it is created from type(self):

I think the second should be the preferred behavior, so the source should be updated to reflect that it's calling self.__class__(...) rather than datetime(...). I can prepare a PR if this would be desirable.

(That said, I'm not 100% clear under what circumstances the code in is actually *used*, so I'm not sure how to write tests for it - is essentially documentation, or is there a way to explicitly fall back to it?)

Per this issue on the pypy3 tracker:
Date User Action Args
2017-08-16 17:01:46p-gansslesetrecipients: + p-ganssle
2017-08-16 17:01:45p-gansslesetmessageid: <>
2017-08-16 17:01:45p-gansslelinkissue31222 messages
2017-08-16 17:01:45p-gansslecreate