Exemple #1
0
 def default_operator(self):
     """Make use of the 'operator' library or use a lambda function."""
     return DefaultOperator(lambda x, y: x**y, "**")
Exemple #2
0
 def default_operator(self):
     """Nothing fancy here."""
     return DefaultOperator(lambda x: x, "")
Exemple #3
0
 def default_operator(self):
     """:return the default operator of the operation."""
     return DefaultOperator(lambda x, y: x + y, "+")
Exemple #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, "&")
Exemple #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), "/")
Exemple #6
0
 def default_operator(self):
     """Func."""
     return DefaultOperator(lambda x: x, "")