
Feb. 7, 2020
12:54 a.m.
07.02.20 01:00, Paul G пише:
I will note that it doesn't seem to be true that operators never call standard methods. Looks like date.__add__ calls date.toordinal and date.fromordinal (at least in the pure Python implementation), and datetime calls those plus tzinfo.utcoffset. Not sure if the rule Serhiy is citing is only intended to apply to builtins, though.
It is an implementation detail. The C implementation does not call date.toordinal and date.fromordinal.