philipbl / python-persistent-queue

A persistent queue for Python
9 stars 4 forks source link

Create iterator for queue #20

Closed TomNash closed 4 years ago

TomNash commented 4 years ago

Allows queue to be used as such:

from persistent_queue import PersistentQueue

queue = PersistentQueue('queue')
queue.push(5)
queue.push(10)

assert 5 in queue
assert 15 not in queue

for item in queue:
    print(item)