[Zope3-checkins] CVS: Zope3/src/datetime - _datetime.py:1.35

Tim Peters tim.one@comcast.net
Fri, 6 Jun 2003 14:17:07 -0400


Update of /cvs-repository/Zope3/src/datetime
In directory cvs.zope.org:/tmp/cvs-serv29755/src/datetime

Modified Files:
	_datetime.py 
Log Message:
Removed comments about, and workarounds for, Python 2.2.2 bugs.


=== Zope3/src/datetime/_datetime.py 1.34 => 1.35 ===
--- Zope3/src/datetime/_datetime.py:1.34	Fri Feb  7 16:45:27 2003
+++ Zope3/src/datetime/_datetime.py	Fri Jun  6 14:17:06 2003
@@ -903,8 +903,7 @@
             self._checkOverflow(t.year)
             result = self.__class__(t.year, t.month, t.day)
             return result
-        raise TypeError
-        # XXX Should be 'return NotImplemented', but there's a bug in 2.2...
+        return NotImplemented
 
     __radd__ = __add__
 
@@ -1168,7 +1167,6 @@
                        (other.__hour, other.__minute, other.__second,
                         other.__microsecond))
         if myoff is None or otoff is None:
-            # XXX Buggy in 2.2.2.
             raise TypeError("cannot compare naive and aware times")
         myhhmm = self.__hour * 60 + self.__minute - myoff
         othhmm = other.__hour * 60 + other.__minute - otoff
@@ -1692,7 +1690,6 @@
                         other.__hour, other.__minute, other.__second,
                         other.__microsecond))
         if myoff is None or otoff is None:
-            # XXX Buggy in 2.2.2.
             raise TypeError("cannot compare naive and aware datetimes")
         # XXX What follows could be done more efficiently...
         diff = self - other     # this will take offsets into account