Kaydet (Commit) 04097a62 authored tarafından Neal Norwitz's avatar Neal Norwitz

Fix typo in method name. The LT class implemented less than. The LE class

should implement less than or equal to (as the code does).
üst 705cd06f
...@@ -210,7 +210,7 @@ class TestHeapC(TestHeap): ...@@ -210,7 +210,7 @@ class TestHeapC(TestHeap):
class LE: class LE:
def __init__(self, x): def __init__(self, x):
self.x = x self.x = x
def __lt__(self, other): def __le__(self, other):
return self.x >= other.x return self.x >= other.x
data = [random.random() for i in range(100)] data = [random.random() for i in range(100)]
target = sorted(data, reverse=True) target = sorted(data, reverse=True)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment