cpython/Modules
Guido van Rossum 47b9ff6ba1 Restructure comparison dramatically. There is no longer a default
*ordering* between objects; there is only a default equality test
(defined by an object being equal to itself only).  Read the comment
in object.c.  The current implementation never uses a three-way
comparison to compute a rich comparison, but it does use a rich
comparison to compute a three-way comparison.  I'm not quite done
ripping out all the calls to PyObject_Compare/Cmp, or replacing
tp_compare implementations with tp_richcompare implementations;
but much of that has happened (to make most unit tests pass).

The following tests still fail, because I need help deciding
or understanding:

test_codeop -- depends on comparing code objects
test_datetime -- need Tim Peters' opinion
test_marshal -- depends on comparing code objects
test_mutants -- need help understanding it

The problem with test_codeop and test_marshal is this: these tests
compare two different code objects and expect them to be equal.
Is that still a feature we'd like to support?  I've temporarily
removed the comparison and hash code from code objects, so they
use the default (equality by pointer only) comparison.

For the other two tests, run them to see for yourself.
(There may be more failing test with "-u all".)

A general problem with getting lots of these tests to pass is
the reality that for object types that have a natural total ordering,
implementing __cmp__ is much more convenient than implementing
__eq__, __ne__, __lt__, and so on.  Should we go back to allowing
__cmp__ to provide a total ordering?  Should we provide some other
way to implement rich comparison with a single method override?
Alex proposed a __key__() method; I've considered a __richcmp__()
method.  Or perhaps __cmp__() just shouldn't be killed off...
2006-08-24 00:41:19 +00:00
..
_ctypes Merge current trunk into p3yk. This includes the PyNumber_Index API change, 2006-08-21 19:07:27 +00:00
_sqlite Merged revisions 46753-51188 via svnmerge from 2006-08-11 14:57:12 +00:00
cjkcodecs Merge the rest of the trunk. 2006-06-08 15:35:45 +00:00
expat Merge current trunk into p3yk. This includes the PyNumber_Index API change, 2006-08-21 19:07:27 +00:00
zlib Remove unneeded directories. 2006-01-03 06:48:38 +00:00
Setup.config.in Patch to make _codecs a builtin module. This is necessary since 2002-12-12 17:37:50 +00:00
Setup.dist Merged revisions 46753-51188 via svnmerge from 2006-08-11 14:57:12 +00:00
_bisectmodule.c More unconsting. 2006-02-27 17:20:04 +00:00
_bsddb.c Merge current trunk into p3yk. This includes the PyNumber_Index API change, 2006-08-21 19:07:27 +00:00
_codecsmodule.c Merge current trunk into p3yk. This includes the PyNumber_Index API change, 2006-08-21 19:07:27 +00:00
_csv.c Much-needed merge (using svnmerge.py this time) of trunk changes into p3yk. 2006-05-27 19:21:47 +00:00
_curses_panel.c Coverity-found bug: don't use temp->next *before* checking it for NULL. Also 2006-03-07 13:38:14 +00:00
_cursesmodule.c Merge current trunk into p3yk. This includes the PyNumber_Index API change, 2006-08-21 19:07:27 +00:00
_elementtree.c Merge current trunk into p3yk. This includes the PyNumber_Index API change, 2006-08-21 19:07:27 +00:00
_functoolsmodule.c Get rid of most of the flags (in tp_flags) that keep track of various 2006-07-27 21:53:35 +00:00
_hashopenssl.c Partially merge trunk into p3yk. The removal of Mac/Tools is confusing svn 2006-06-08 14:42:34 +00:00
_heapqmodule.c Also make _heapq.nlargest() use Py_ssize_t instead of ints, to iter over 2006-02-16 19:21:53 +00:00
_hotshot.c Merge current trunk into p3yk. This includes the PyNumber_Index API change, 2006-08-21 19:07:27 +00:00
_localemodule.c Merged revisions 46753-51188 via svnmerge from 2006-08-11 14:57:12 +00:00
_lsprof.c Merge p3yk branch with the trunk up to revision 45595. This breaks a fair 2006-04-21 10:40:58 +00:00
_randommodule.c Check return result from Py_InitModule*(). This API can fail. 2006-01-19 06:09:39 +00:00
_sre.c Merge current trunk into p3yk. This includes the PyNumber_Index API change, 2006-08-21 19:07:27 +00:00
_ssl.c Merged revisions 46753-51188 via svnmerge from 2006-08-11 14:57:12 +00:00
_struct.c Merged revisions 46753-51188 via svnmerge from 2006-08-11 14:57:12 +00:00
_testcapimodule.c Merged revisions 46753-51188 via svnmerge from 2006-08-11 14:57:12 +00:00
_tkinter.c Merge current trunk into p3yk. This includes the PyNumber_Index API change, 2006-08-21 19:07:27 +00:00
_typesmodule.c Merged revisions 46753-51188 via svnmerge from 2006-08-11 14:57:12 +00:00
_weakref.c Merged revisions 46753-51188 via svnmerge from 2006-08-11 14:57:12 +00:00
addrinfo.h Add comments at end of every #endif and fix ones already there when for closing 2004-07-10 19:30:39 +00:00
almodule.c Merge p3yk branch with the trunk up to revision 45595. This breaks a fair 2006-04-21 10:40:58 +00:00
ar_beos
arraymodule.c Merge current trunk into p3yk. This includes the PyNumber_Index API change, 2006-08-21 19:07:27 +00:00
audioop.c Partially merge trunk into p3yk. The removal of Mac/Tools is confusing svn 2006-06-08 14:42:34 +00:00
binascii.c Merged revisions 46753-51188 via svnmerge from 2006-08-11 14:57:12 +00:00
bsddbmodule.c Get rid of dict.has_key(). Boy this has a lot of repercussions! 2006-08-18 22:13:04 +00:00
bz2module.c Merge current trunk into p3yk. This includes the PyNumber_Index API change, 2006-08-21 19:07:27 +00:00
cPickle.c Fixed cPickle, by restoring some of the deleted code. 2006-08-17 22:28:49 +00:00
cStringIO.c Merge p3yk branch with the trunk up to revision 45595. This breaks a fair 2006-04-21 10:40:58 +00:00
cdmodule.c Check return result from Py_InitModule*(). This API can fail. 2006-01-19 06:09:39 +00:00
cgen.py Whitespace normalization, via reindent.py. 2004-07-18 06:16:08 +00:00
cgensupport.c
cgensupport.h
clmodule.c Check return result from Py_InitModule*(). This API can fail. 2006-01-19 06:09:39 +00:00
cmathmodule.c Check return result from Py_InitModule*(). This API can fail. 2006-01-19 06:09:39 +00:00
collectionsmodule.c Merge current trunk into p3yk. This includes the PyNumber_Index API change, 2006-08-21 19:07:27 +00:00
config.c.in Merged revisions 46753-51188 via svnmerge from 2006-08-11 14:57:12 +00:00
cryptmodule.c Merged revisions 46753-51188 via svnmerge from 2006-08-11 14:57:12 +00:00
cstubs Remove PyArg_NoArgs() and PyArg_GetInt() 2006-03-17 09:00:00 +00:00
datetimemodule.c Get rid of most of the flags (in tp_flags) that keep track of various 2006-07-27 21:53:35 +00:00
dbmmodule.c Fix this right for has_key(). This required adding tp_as_sequence. 2006-08-19 23:11:47 +00:00
dlmodule.c Merged revisions 46753-51188 via svnmerge from 2006-08-11 14:57:12 +00:00
errnomodule.c Check return result from Py_InitModule*(). This API can fail. 2006-01-19 06:09:39 +00:00
fcntlmodule.c Merged revisions 46753-51188 via svnmerge from 2006-08-11 14:57:12 +00:00
flmodule.c Partially merge trunk into p3yk. The removal of Mac/Tools is confusing svn 2006-06-08 14:42:34 +00:00
fmmodule.c Partially merge trunk into p3yk. The removal of Mac/Tools is confusing svn 2006-06-08 14:42:34 +00:00
fpectlmodule.c Merged revisions 46753-51188 via svnmerge from 2006-08-11 14:57:12 +00:00
fpetestmodule.c Check return result from Py_InitModule*(). This API can fail. 2006-01-19 06:09:39 +00:00
gc_weakref.txt SF 1055820: weakref callback vs gc vs threads 2004-10-30 23:09:22 +00:00
gcmodule.c Fix test_gc failure by fixing the bug test_gc found: __del__ methods were no 2006-08-21 22:15:41 +00:00
gdbmmodule.c And the gdbm module's test now passes again. 2006-08-19 23:18:48 +00:00
getaddrinfo.c SF #784031: Byte-order bug in socket-module getaddrinfo.c 2003-08-17 21:28:39 +00:00
getbuildinfo.c Generate getbuildinfo.o each time the linker is invoked; 2006-01-18 09:13:51 +00:00
getnameinfo.c
getpath.c Merged revisions 46753-51188 via svnmerge from 2006-08-11 14:57:12 +00:00
glmodule.c
grpmodule.c Much-needed merge (using svnmerge.py this time) of trunk changes into p3yk. 2006-05-27 19:21:47 +00:00
imageop.c Check return result from Py_InitModule*(). This API can fail. 2006-01-19 06:09:39 +00:00
imgfile.c Check return result from Py_InitModule*(). This API can fail. 2006-01-19 06:09:39 +00:00
itertoolsmodule.c Merged revisions 46753-51188 via svnmerge from 2006-08-11 14:57:12 +00:00
ld_so_aix SF Bug # 941346, AIX shared library fix 2005-10-03 03:57:09 +00:00
ld_so_beos
linuxaudiodev.c Partially merge trunk into p3yk. The removal of Mac/Tools is confusing svn 2006-06-08 14:42:34 +00:00
main.c Merged revisions 46753-51188 via svnmerge from 2006-08-11 14:57:12 +00:00
makesetup
makexp_aix - Changes donated by Elemental Security to make it work on AIX 5.3 2005-09-14 18:09:42 +00:00
mathmodule.c Get rid of remnants of integer division 2006-03-24 08:14:36 +00:00
md5.c Merge p3yk branch with the trunk up to revision 45595. This breaks a fair 2006-04-21 10:40:58 +00:00
md5.h Merge p3yk branch with the trunk up to revision 45595. This breaks a fair 2006-04-21 10:40:58 +00:00
md5module.c Merge p3yk branch with the trunk up to revision 45595. This breaks a fair 2006-04-21 10:40:58 +00:00
mmapmodule.c Merge current trunk into p3yk. This includes the PyNumber_Index API change, 2006-08-21 19:07:27 +00:00
nismodule.c Revert backwards-incompatible const changes. 2006-02-27 16:46:16 +00:00
operator.c Merge current trunk into p3yk. This includes the PyNumber_Index API change, 2006-08-21 19:07:27 +00:00
ossaudiodev.c Partially merge trunk into p3yk. The removal of Mac/Tools is confusing svn 2006-06-08 14:42:34 +00:00
parsermodule.c Much-needed merge (using svnmerge.py this time) of trunk changes into p3yk. 2006-05-27 19:21:47 +00:00
posixmodule.c Merge current trunk into p3yk. This includes the PyNumber_Index API change, 2006-08-21 19:07:27 +00:00
puremodule.c Check return result from Py_InitModule*(). This API can fail. 2006-01-19 06:09:39 +00:00
pwdmodule.c Merge p3yk branch with the trunk up to revision 45595. This breaks a fair 2006-04-21 10:40:58 +00:00
pyexpat.c Get rid of the last mention of WITH_CYCLE_GC that I could find. 2006-08-17 05:40:03 +00:00
python.c Apparently FreeBSD enables some HW floating-point exceptions by default. 2002-12-28 21:56:08 +00:00
readline.c Merged revisions 46753-51188 via svnmerge from 2006-08-11 14:57:12 +00:00
resource.c Partially merge trunk into p3yk. The removal of Mac/Tools is confusing svn 2006-06-08 14:42:34 +00:00
rgbimgmodule.c Merge current trunk into p3yk. This includes the PyNumber_Index API change, 2006-08-21 19:07:27 +00:00
rotatingtree.c randombits(): Stop compiler warning about mixing 2006-02-15 03:01:30 +00:00
rotatingtree.h Much-needed merge (using svnmerge.py this time) of trunk changes into p3yk. 2006-05-27 19:21:47 +00:00
selectmodule.c Merged revisions 46753-51188 via svnmerge from 2006-08-11 14:57:12 +00:00
sgimodule.c
sha256module.c Partially merge trunk into p3yk. The removal of Mac/Tools is confusing svn 2006-06-08 14:42:34 +00:00
sha512module.c Partially merge trunk into p3yk. The removal of Mac/Tools is confusing svn 2006-06-08 14:42:34 +00:00
shamodule.c Partially merge trunk into p3yk. The removal of Mac/Tools is confusing svn 2006-06-08 14:42:34 +00:00
signalmodule.c Check return result from Py_InitModule*(). This API can fail. 2006-01-19 06:09:39 +00:00
socketmodule.c Merge current trunk into p3yk. This includes the PyNumber_Index API change, 2006-08-21 19:07:27 +00:00
socketmodule.h Get socketmodule to build after adding netlink support. 2006-01-16 04:31:40 +00:00
spwdmodule.c Merged revisions 46753-51188 via svnmerge from 2006-08-11 14:57:12 +00:00
sre.h Merged revisions 46753-51188 via svnmerge from 2006-08-11 14:57:12 +00:00
sre_constants.h Implemented non-recursive SRE matching. 2003-10-17 22:13:16 +00:00
stropmodule.c Merge p3yk branch with the trunk up to revision 45595. This breaks a fair 2006-04-21 10:40:58 +00:00
sunaudiodev.c Check return result from Py_InitModule*(). This API can fail. 2006-01-19 06:09:39 +00:00
svmodule.c Check return result from Py_InitModule*(). This API can fail. 2006-01-19 06:09:39 +00:00
symtablemodule.c Check return result from Py_InitModule*(). This API can fail. 2006-01-19 06:09:39 +00:00
syslogmodule.c Partially merge trunk into p3yk. The removal of Mac/Tools is confusing svn 2006-06-08 14:42:34 +00:00
termios.c Check return result from Py_InitModule*(). This API can fail. 2006-01-19 06:09:39 +00:00
testcapi_long.h
threadmodule.c Restructure comparison dramatically. There is no longer a default 2006-08-24 00:41:19 +00:00
timemodule.c Merged revisions 46753-51188 via svnmerge from 2006-08-11 14:57:12 +00:00
timing.h
timingmodule.c
tkappinit.c Remove warning about implicit declaration of strcmp() 2004-06-13 20:29:55 +00:00
unicodedata.c Merge current trunk into p3yk. This includes the PyNumber_Index API change, 2006-08-21 19:07:27 +00:00
unicodedata_db.h Update Unicode database to Unicode 4.1. 2006-03-09 23:38:20 +00:00
unicodename_db.h Update Unicode database to Unicode 4.1. 2006-03-09 23:38:20 +00:00
xxmodule.c Merge part of the trunk changes into the p3yk branch. This merges from 43030 2006-04-21 09:43:23 +00:00
xxsubtype.c Merge p3yk branch with the trunk up to revision 45595. This breaks a fair 2006-04-21 10:40:58 +00:00
yuv.h
yuvconvert.c
zipimport.c Merge current trunk into p3yk. This includes the PyNumber_Index API change, 2006-08-21 19:07:27 +00:00
zlibmodule.c Merged revisions 46753-51188 via svnmerge from 2006-08-11 14:57:12 +00:00