]> granicus.if.org Git - python/commit
Improvements to collections.deque():
authorRaymond Hettinger <python@rcn.com>
Sun, 29 Feb 2004 02:15:56 +0000 (02:15 +0000)
committerRaymond Hettinger <python@rcn.com>
Sun, 29 Feb 2004 02:15:56 +0000 (02:15 +0000)
commit738ec90ca14154493a88fb38728537837a45eebf
treebefdefcf9f592b569500ec15f5920535bf5a722c
parentfe99927630caa7990a24573e49c5d823002d34d7
Improvements to collections.deque():

* Add doctests for the examples in the library reference.
* Add two methods, left() and right(), modeled after deques in C++ STL.
* Apply the new method to asynchat.py.
* Add comparison operators to make deques more substitutable for lists.
* Replace the LookupErrors with IndexErrors to more closely match lists.
Doc/lib/libcollections.tex
Lib/asynchat.py
Lib/test/test_deque.py
Modules/collectionsmodule.c