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 francismb
Recipients belopolsky, eric.smith, francismb, jbatista, joar, maker, petri.lehtinen, ronaldoussoren, thezulk
Date 2013-03-02.20:16:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Hi Joar,
just a detail: is there a reason for the asymmetric check for timedelta isinstance (and raising NotImplemented)? And BTW. isn't a double check for the __sub__ case (or have I missed something)?

+    def __add__(self, other):
+        "Add a time and a timedelta"
+        if not isinstance(other, timedelta):
+            return NotImplemented

+    def __sub__(self, other):
+        "Subtract a time and a timedelta."
+        if isinstance(other, timedelta):
+            return self + -other
+        return NotImplemented

Date User Action Args
2013-03-02 20:16:03francismbsetrecipients: + francismb, ronaldoussoren, belopolsky, eric.smith, maker, petri.lehtinen, thezulk, joar, jbatista
2013-03-02 20:16:03francismbsetmessageid: <>
2013-03-02 20:16:03francismblinkissue17267 messages
2013-03-02 20:16:03francismbcreate