Message239652
> 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. |
|
Date |
User |
Action |
Args |
2015-03-31 01:38:01 | rhettinger | set | recipients:
+ rhettinger, josh.r |
2015-03-31 01:38:01 | rhettinger | set | messageid: <1427765881.17.0.938679451665.issue23793@psf.upfronthosting.co.za> |
2015-03-31 01:38:01 | rhettinger | link | issue23793 messages |
2015-03-31 01:38:00 | rhettinger | create | |
|