def putleft(self, i=None): self.inp.appendleft(i) fire(self)
def put(self, i=None): self.inp.append(i) fire(self)