implements a FIFO pipe that merges lists (see self.put)
Public Member Functions | |
| def | __init__ |
| def | __getitem__ |
| def | __len__ |
| def | __str__ |
| def | append |
| x must be a list and will be appended to the end of the pipe, dropping rightmost elements if necessary | |
| def | get |
| returns the oldest element, without popping it out of the pipe. | |
| def | is_full |
| def | put |
| if x is subscriptable, insert its contents at the beginning of the pipe. | |
Public Attributes | |
| length | |
| pipe | |
| def IMP.isd.utils.Pipe.append | ( | self, | |
| x | |||
| ) |
x must be a list and will be appended to the end of the pipe, dropping rightmost elements if necessary
| def IMP.isd.utils.Pipe.get | ( | self | ) |
returns the oldest element, without popping it out of the pipe.
Popping occurs in the put() method
| def IMP.isd.utils.Pipe.put | ( | self, | |
| x | |||
| ) |
if x is subscriptable, insert its contents at the beginning of the pipe.
Else insert the element itself. If the pipe is full, drop the oldest element.