Message113801
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. |
|
Date |
User |
Action |
Args |
2010-08-13 17:49:12 | flox | set | recipients:
+ flox, pitrou, vstinner |
2010-08-13 17:49:11 | flox | set | messageid: <1281721751.97.0.668278807249.issue9589@psf.upfronthosting.co.za> |
2010-08-13 17:49:10 | flox | link | issue9589 messages |
2010-08-13 17:49:09 | flox | create | |
|