Raymond Hettinger <rhettin...@users.sourceforge.net> added the comment:
Sorry, I'm going to reject this one. Looking at implementations in other languages, I see that this is almost never needed. It is not worth complicating the API which is currently very simple. Also, there is an issue in that the semantics are not self-evident. Is d.popnleft(n) equal to [d.pop() for i in range(n)] or is it equal to list(d)[:n]? Should it return a list or deque? Should it raise an exception if 0 < len(d) < n? There are many uses possible operations that could be added to deques (such as swap, pick, roll, etc) but it is better to leave those for someone to write their own utility functions. The important thing for deques is to provide the building blocks. ---------- assignee: -> rhettinger nosy: +rhettinger resolution: -> rejected status: open -> closed versions: -Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.3 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9380> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com