예제 #1
0
 def default_operator(self):
     """Make use of the 'operator' library or use a lambda function."""
     return DefaultOperator(lambda x, y: x**y, "**")
예제 #2
0
 def default_operator(self):
     """Nothing fancy here."""
     return DefaultOperator(lambda x: x, "")
예제 #3
0
 def default_operator(self):
     """:return the default operator of the operation."""
     return DefaultOperator(lambda x, y: x + y, "+")
예제 #4
0
 def default_operator(self):
     """Make use of the 'operator' library or use a lambda function."""
     return DefaultOperator(
         lambda x, y: int(x) & int(y)
         if isinstance(x, float) or isinstance(y, float) else x & y, "&")
예제 #5
0
 def default_operator(self):
     """Make use of the 'operator' library or use a lambda function."""
     return DefaultOperator(lambda x, y: int(x / y), "/")
예제 #6
0
파일: leaf.py 프로젝트: Elgedr/Python
 def default_operator(self):
     """Func."""
     return DefaultOperator(lambda x: x, "")