示例#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, "")