FWIW, I've posted a recipe for a pure python version of Py2.4's collections.deque(). It is a drop-in replacement and should work with Py2.0 and later: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/259179 Raymond Hettinger