[Zope3-checkins] CVS: Zope3/src/datetime - _datetime.py:1.34.22.1
Grégoire Weber
zope@i-con.ch
Sun, 22 Jun 2003 10:24:22 -0400
Update of /cvs-repository/Zope3/src/datetime
In directory cvs.zope.org:/tmp/cvs-serv24874/src/datetime
Modified Files:
Tag: cw-mail-branch
_datetime.py
Log Message:
Synced up with HEAD
=== Zope3/src/datetime/_datetime.py 1.34 => 1.34.22.1 ===
--- Zope3/src/datetime/_datetime.py:1.34 Fri Feb 7 16:45:27 2003
+++ Zope3/src/datetime/_datetime.py Sun Jun 22 10:22:21 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