Florent Xicluna <florent.xicl...@gmail.com> added the comment: For some reason, sys.modules['heapq'] contains the Python implementation instead of the C implementation.
Tested with r83981 on python 3: Python 3.2a1+ (py3k:83981M, Aug 13 2010, 19:02:31) [GCC 4.3.4] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import heapq >>> heapq.heappop(10) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/florent/dev/python/py3trunk/Lib/heapq.py", line 140, in heappop lastelt = heap.pop() # raises appropriate IndexError if heap is empty AttributeError: 'int' object has no attribute 'pop' >>> import _heapq >>> _heapq.heappop(10) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: heap argument must be a list These tests (TestErrorHandling) are supposed to run with the C module only. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9589> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com