Package libxyz :: Package core :: Module queue :: Class Queue |
[hide private]
[frames] | no frames]

# Class Queue

source code

    object --+
             |
          list --+
                 |
                Queue

Fixed-sized list

Instance Methods | [hide private]
new list |
__init__(self, maxsize) x.__init__(...) initializes x; see x.__class__.__doc__ for signature | source code
set_size(self, size) Set queue size | source code
push(self, item) Push a new item to queue. | source code
item |
pop(self) Pop item from the beginning of the queue Raise IndexError if queue is empty | source code
clear(self) Clear queue | source code
tail(self) Return tail element | source code
Inherited from `list`: `__add__`, `__contains__`, `__delitem__`, `__delslice__`, `__eq__`, `__ge__`, `__getattribute__`, `__getitem__`, `__getslice__`, `__gt__`, `__hash__`, `__iadd__`, `__imul__`, `__iter__`, `__le__`, `__len__`, `__lt__`, `__mul__`, `__ne__`, `__new__`, `__repr__`, `__reversed__`, `__rmul__`, `__setitem__`, `__setslice__`, `append`, `count`, `extend`, `index`, `insert`, `remove`, `reverse`, `sort` Inherited from `object`: `__delattr__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__str__`

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, maxsize) (Constructor) | source code
x.__init__(...) initializes x; see x.__class__.__doc__ for signature Returns: new list Overrides: object.__init__ (inherited documentation)

### push(self, item) | source code
Push a new item to queue. If queue already contains maxsize elements replace the oldest one.

### pop(self) | source code
Pop item from the beginning of the queue Raise IndexError if queue is empty Returns: item Overrides: list.pop