Raymond Hettinger added the comment:
> The behavior for multiplying or adding doesn't seem quite so
> intuitive when you allow for a bounded deque.
What would you want it to do? By design, the key feature of maxlen is pop old
inputs to make way newer appends -- that is its essence.
It would be surprising if the following invariant didn't hold:
>>> deque('abc' * 3, maxlen=5) == deque('abc', maxlen=5) * 3
True
That said, I don't expect that people are going to commonly be doing d*=n where
len(d) > 1 and there is a maxlen > len(d)*n. The normal cases are
unsurprising.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue23793>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com