Message125979
Note that before r82065, python prototype, now available as Lib/datetime.py had binary operations implemented to return subclass instances. Here is annotated pre-r82065 code:
39876 gvanrossum def __add__(self, other):
39876 gvanrossum if isinstance(other, timedelta):
39928 gvanrossum return self.__class__(self.__days + other.__days,
39876 gvanrossum self.__seconds + other.__seconds,
39876 gvanrossum self.__microseconds + other.__microseconds)
40207 tim_one return NotImplemented
39876 gvanrossum |
|
Date |
User |
Action |
Args |
2011-01-11 01:51:27 | belopolsky | set | recipients:
+ belopolsky, brett.cannon, amaury.forgeotdarc, mark.dickinson, stingray |
2011-01-11 01:51:27 | belopolsky | set | messageid: <1294710687.0.0.881074740056.issue2267@psf.upfronthosting.co.za> |
2011-01-11 01:51:24 | belopolsky | link | issue2267 messages |
2011-01-11 01:51:24 | belopolsky | create | |
|