Forgot to actually enqueue in MaxLengthQueue.enqueue.

This commit is contained in:
Jeremy Fincher 2003-04-09 18:35:59 +00:00
parent 9295254ccb
commit 5da85d4f2f

View File

@ -232,9 +232,11 @@ class MaxLengthQueue(queue):
queue.__setstate__(self, q) queue.__setstate__(self, q)
def enqueue(self, elt): def enqueue(self, elt):
queue.enqueue(self, elt)
if len(self) > self.length: if len(self) > self.length:
self.dequeue() self.dequeue()
class IterableMap(object): class IterableMap(object):
"""Define .iteritems() in a class and subclass this to get the other iters. """Define .iteritems() in a class and subclass this to get the other iters.
""" """