SimpleQueue#

class SimpleQueue(q=None)#

Bases: object

Simple queue.

__init__(q=None)#

Constructor.

Parameters:

q (iterable) – Queue will be initialized from this, if provided.

Methods

__init__([q])

Constructor.

pop()

Return the first element in the queue.

put(x)

Put x at the back of the queue.

pop()#

Return the first element in the queue.

Raises:

KeyError – If the queue is empty.

put(x)#

Put x at the back of the queue.