[issue11004] AssertionError on collections.deque().count(1)
Andrew Brown
report at bugs.python.org
Tue Jan 25 16:58:43 CET 2011
Andrew Brown <brownan at gmail.com> added the comment:
This bug trigger can be simplified down, see my attached bug_simplified.py
The problem seems to be in deque_count(). What's happening is that after the rotations, the 16 items reside in the last 16 slots of one block.
In deque_count()'s for loop, the block pointer is incremented regardless of whether the loop has another iteration to go or not. Thus, it's trying to grab the (nonexistant) next block, even though the for loop would have exited anyways.
----------
nosy: +Andrew.Brown
Added file: http://bugs.python.org/file20514/bug_simplified.py
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11004>
_______________________________________
More information about the Python-bugs-list
mailing list