Add a func to the cmd chain with given priority
(self, func, priority=0)
| 117 | return str(self.chain) |
| 118 | |
| 119 | def add(self, func, priority=0): |
| 120 | """ Add a func to the cmd chain with given priority """ |
| 121 | self.chain.append((priority, func)) |
| 122 | self.chain.sort(key=lambda x: x[0]) |
| 123 | |
| 124 | def __iter__(self): |
| 125 | """ Return all objects in chain. |