Esempio n. 1
0
 def __lshift__(cls, self, arg):
     if callable(self.value) and callable(arg):
         return Pysk.compose(arg, self.value)
     elif callable(self.value) and not callable(arg):
         return self.value(arg)
     elif not callable(self.value) and callable(arg):
         return arg(self.value)
     elif not callable(self.value) and not callable(arg):
         raise TypeError("'Pipe() >> argument << argument' is invalid")
     else:
         raise TypeError("Case fall-through error. This should never occur")
Esempio n. 2
0
 def __str__(self):
     return Pysk.__str__(self)
Esempio n. 3
0
 def __repr__(self):
     return Pysk.__repr__(self)