[issue26194] Undefined behavior for deque.insert() when len(d) == maxlen
Serhiy Storchaka
report at bugs.python.org
Wed Jan 27 04:11:16 EST 2016
Serhiy Storchaka added the comment:
But the postcondition d[i] == newitem is broken if i is negative.
>>> d = deque('ABC', maxlen=3)
>>> d.insert(-1, None)
>>> d
deque(['A', None, 'B'], maxlen=3)
I would expected ['A', 'B', None].
----------
resolution: fixed ->
status: closed -> open
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26194>
_______________________________________
More information about the Python-bugs-list
mailing list