
Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24444/Lib Modified Files: asynchat.py Log Message: 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. Index: asynchat.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/asynchat.py,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** asynchat.py 7 Feb 2004 03:19:10 -0000 1.22 --- asynchat.py 29 Feb 2004 02:15:56 -0000 1.23 *************** *** 263,271 **** def first (self): ! it = iter(self.list) ! try: ! return it.next() ! except StopIteration: ! raise IndexError def push (self, data): --- 263,267 ---- def first (self): ! return self.list.left() def push (self, data):