chiark / gitweb /
ec.c, field.c: Remove redundant `FOO_pyrichcompare' methods.
authorMark Wooding <mdw@distorted.org.uk>
Tue, 22 Oct 2019 16:53:44 +0000 (17:53 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 11 Apr 2020 11:44:21 +0000 (12:44 +0100)
commite6ed58c71b526c8dbb471484d95bb467cddf89d4
tree31f5f8bbc0f4434976ddc426fcffb5f89f818430
parentc567f805f46359a56f7f5ebbf51b68a4ab275461
ec.c, field.c: Remove redundant `FOO_pyrichcompare' methods.

The abstract base classes already have the necessary comparison methods,
so there's nothing to be gained by repeating the same methods on
subclasses.  (Indeed, Python might pointlessly allocate more memory for
the corresponding Python-level descriptors, but I haven't checked.)  But
there is something to be lost: Python 3 explicitly clobbers the
`__hash__' methods of subclasses which declare new equality methods.  We
could add duplicates of the hash methods throughout the subclass graph,
but it seems better to delete the pointless equality methods which are
causing the problem.
ec.c
field.c