0
0
mirror of https://github.com/python/cpython.git synced 2024-12-01 11:15:56 +01:00
cpython/Modules
Tim Peters 8d81a012ef date and datetime comparison: when we don't know how to
compare against "the other" argument, we raise TypeError,
in order to prevent comparison from falling back to the
default (and worse than useless, in this case) comparison
by object address.

That's fine so far as it goes, but leaves no way for
another date/datetime object to make itself comparable
to our objects.  For example, it leaves Marc-Andre no way
to teach mxDateTime dates how to compare against Python
dates.

Discussion on Python-Dev raised a number of impractical
ideas, and the simple one implemented here:  when we don't
know how to compare against "the other" argument, we raise
TypeError *unless* the other object has a timetuple attr.
In that case, we return NotImplemented instead, and Python
will give the other object a shot at handling the
comparison then.

Note that comparisons of time and timedelta objects still
suffer the original problem, though.
2003-01-24 22:36:34 +00:00
..
expat
_bsddb.c bugfix: do not double-close DB cursor during deallocation when the 2003-01-17 08:42:50 +00:00
_codecsmodule.c
_curses_panel.c
_cursesmodule.c
_hotshot.c Patch #661760: Cygwin auto-import module patch 2003-01-06 12:41:26 +00:00
_localemodule.c
_randommodule.c Patch #661760: Cygwin auto-import module patch 2003-01-06 12:41:26 +00:00
_sre.c
_ssl.c
_testcapimodule.c
_tkinter.c Convert booleans to integers in IntVar.set. Fixes #671741. 2003-01-22 09:17:38 +00:00
_weakref.c
.cvsignore
addrinfo.h
almodule.c
ar_beos
arraymodule.c SF patch #662433: Fill arraymodule's tp_iter and sq_contains slots 2003-01-07 01:58:52 +00:00
audioop.c
binascii.c
bsddbmodule.c
bz2module.c Patch #661760: Cygwin auto-import module patch 2003-01-06 12:41:26 +00:00
ccpython.cc
cdmodule.c
cgen.py
cgensupport.c
cgensupport.h
clmodule.c
cmathmodule.c
config.c.in
cPickle.c Patch #661760: Cygwin auto-import module patch 2003-01-06 12:41:26 +00:00
cryptmodule.c
cStringIO.c
cstubs
datetimemodule.c date and datetime comparison: when we don't know how to 2003-01-24 22:36:34 +00:00
dbmmodule.c
dlmodule.c
errnomodule.c
fcntlmodule.c
flmodule.c
fmmodule.c
fpectlmodule.c
fpetestmodule.c
gcmodule.c
gdbmmodule.c
getaddrinfo.c
getbuildinfo.c
getnameinfo.c
getpath.c
glmodule.c
grpmodule.c
imageop.c
imgfile.c
ld_so_aix
ld_so_beos
linuxaudiodev.c
main.c
makesetup
makexp_aix
mathmodule.c
md5.h
md5c.c
md5module.c
mmapmodule.c SF #665913, Fix mmap module core dump with unix 2003-01-10 20:52:16 +00:00
mpzmodule.c
nismodule.c
operator.c SF patch #670423: Add missing identity tests to operator.c 2003-01-18 23:22:20 +00:00
ossaudiodev.c Get build working on Redhat 7.2 linux 2.4.7 2003-01-10 21:27:54 +00:00
parsermodule.c
pcre-int.h
pcre.h
pcremodule.c
posixmodule.c Get rid of compiler warnings 2003-01-10 15:29:16 +00:00
puremodule.c
pwdmodule.c
pyexpat.c Conditionalize features not found in PyXML 1.95.2. 2003-01-21 11:09:21 +00:00
pypcre.c
python.c
readline.c Fix from Michael Stone for SF bug #660476 and #513033 (bogus thread 2003-01-07 20:34:19 +00:00
regexmodule.c
regexpr.c
regexpr.h
resource.c
rgbimgmodule.c
rotormodule.c
selectmodule.c
Setup.config.in
Setup.dist
sgimodule.c
shamodule.c
signalmodule.c
socketmodule.c Patch #661760: Cygwin auto-import module patch 2003-01-06 12:41:26 +00:00
socketmodule.h
sre_constants.h
sre.h
stropmodule.c
structmodule.c
sunaudiodev.c
svmodule.c
symtablemodule.c
syslogmodule.c
termios.c
testcapi_long.h
threadmodule.c
timemodule.c Windows flavor of floatsleep(): folded long lines, introduced a temp 2003-01-19 04:54:58 +00:00
timing.h
timingmodule.c
tkappinit.c
unicodedata_db.h
unicodedata.c
unicodename_db.h
xreadlinesmodule.c
xxmodule.c
xxsubtype.c
yuv.h
yuvconvert.c
zipimport.c
zlibmodule.c