d = deque()
print(d)
print(d.maxlen)
d = deque(maxlen=3)
print(d)
print(d.maxlen)
d = deque(list(range(5)))
print(d)
print(d.maxlen)
d = deque(list(range(5)), maxlen=3)
print(d)
print(d.maxlen)
Проверьте maxlen deque в python 2.6