This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author belopolsky
Recipients amaury.forgeotdarc, belopolsky, brett.cannon, mark.dickinson, stingray
Date 2011-01-11.01:51:24
SpamBayes Score 0.00043622297
Marked as misclassified No
Message-id <1294710687.0.0.881074740056.issue2267@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2011-01-11 01:51:27belopolskysetrecipients: + belopolsky, brett.cannon, amaury.forgeotdarc, mark.dickinson, stingray
2011-01-11 01:51:27belopolskysetmessageid: <1294710687.0.0.881074740056.issue2267@psf.upfronthosting.co.za>
2011-01-11 01:51:24belopolskylinkissue2267 messages
2011-01-11 01:51:24belopolskycreate