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 josh.r
Recipients josh.r, mark.dickinson, python-dev, rhettinger, serhiy.storchaka, tim.peters, vstinner
Date 2016-01-27.23:36:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1453937797.64.0.276060685022.issue26194@psf.upfronthosting.co.za>
In-reply-to
Content
I agree with Tim that arbitrarily deciding that insert should behave more like appendleft is surprising. This really feels like guessing at what the user wants, silently doing something that really isn't predictable.

Any of the following seem nicer (not exactly arguing for any but #1):

1. Raising an exception for full deque
2. Making insert pop left when full (and possibly make insertleft that will pop right; the name isn't perfect, but it would make the symmetry between "no suffix pops left and 'left' suffix pops right" line up with other deque methods)
3. Adding an optional argument to say which end should be popped (defaulting to "raise an exception", probably no good though, since it would break Sequence rules.
History
Date User Action Args
2016-01-27 23:36:37josh.rsetrecipients: + josh.r, tim.peters, rhettinger, mark.dickinson, vstinner, python-dev, serhiy.storchaka
2016-01-27 23:36:37josh.rsetmessageid: <1453937797.64.0.276060685022.issue26194@psf.upfronthosting.co.za>
2016-01-27 23:36:37josh.rlinkissue26194 messages
2016-01-27 23:36:37josh.rcreate