chiark
/
gitweb
/
~mdw
/
catacomb-python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
9fa70ff
)
catacomb/__init__.py (BaseRat): Make comparisons actually work.
author
Mark Wooding
<mdw@distorted.org.uk>
Sun, 20 Oct 2019 01:27:53 +0000
(
02:27
+0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Sun, 17 Nov 2019 01:43:30 +0000
(
01:43
+0000)
This was broken in
83c77564338b3e410eb2ca2db3d35173dd6666cc
.
catacomb/__init__.py
patch
|
blob
|
blame
|
history
diff --git
a/catacomb/__init__.py
b/catacomb/__init__.py
index 5399182f76acebc44318244827984bb7112d10d4..c0cb1abaea1f0d17374271817690e87bb48b6661 100644
(file)
--- a/
catacomb/__init__.py
+++ b/
catacomb/__init__.py
@@
-320,7
+320,7
@@
class BaseRat (object):
return type(me)(me._d*n, me._n*d)
def __cmp__(me, you):
n, d = _split_rat(you)
- return
type(me)
(me._n*d, n*me._d)
+ return
cmp
(me._n*d, n*me._d)
def __rcmp__(me, you):
n, d = _split_rat(you)
return cmp(n*me._d, me._n*d)