コード例 #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")
コード例 #2
0
 def __str__(self):
     return Pysk.__str__(self)
コード例 #3
0
 def __repr__(self):
     return Pysk.__repr__(self)