This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author flox
Recipients flox, pitrou, vstinner
Date 2010-08-13.17:49:09
SpamBayes Score 1.4042095e-10
Marked as misclassified No
Message-id <>
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/", 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:12floxsetrecipients: + flox, pitrou, vstinner
2010-08-13 17:49:11floxsetmessageid: <>
2010-08-13 17:49:10floxlinkissue9589 messages
2010-08-13 17:49:09floxcreate