[Python-checkins] r64221 - python/trunk/Lib/test/test_heapq.py

neal.norwitz python-checkins at python.org
Fri Jun 13 08:03:26 CEST 2008


Author: neal.norwitz
Date: Fri Jun 13 08:03:25 2008
New Revision: 64221

Log:
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).


Modified:
   python/trunk/Lib/test/test_heapq.py

Modified: python/trunk/Lib/test/test_heapq.py
==============================================================================
--- python/trunk/Lib/test/test_heapq.py	(original)
+++ python/trunk/Lib/test/test_heapq.py	Fri Jun 13 08:03:25 2008
@@ -210,7 +210,7 @@
         class LE:
             def __init__(self, x):
                 self.x = x
-            def __lt__(self, other):
+            def __le__(self, other):
                 return self.x >= other.x
         data = [random.random() for i in range(100)]
         target = sorted(data, reverse=True)


More information about the Python-checkins mailing list