commonutil.formula¶
算式處理函式庫 / Formula processing functions
-
class
ArgumentSeparator(v=None, *args, **kwds)[source]¶ 表現參數分隔字元的物件 / Class of argument separator token
-
class
BaseFunction[source]¶ 表現函數的基底物件 / Base class of function
-
class
BaseOperator[source]¶ 表現運算子的基底物件 / Base class of operator
-
evaluate(*args)[source]¶ 進行運算,參數數量為 get_operand_count() 方法所傳回的數值
Perform the computation. The number of parameter will be the value returned by get_operand_count() method.
Returns: 運算結果 / Result of evaluation
-
get_operand_count()[source]¶ 取得運算元的數量
Get the number of operand
Returns: 運算元的數量 / Number of operand(s)
-
-
class
Divide(v=None, *args, **kwds)[source]¶ -
evaluate(a, b, *args)[source]¶ 進行運算,參數數量為 get_operand_count() 方法所傳回的數值
Perform the computation. The number of parameter will be the value returned by get_operand_count() method.
Returns: 運算結果 / Result of evaluation
-
-
class
Minus(v=None, *args, **kwds)[source]¶ -
evaluate(a, b, *args)[source]¶ 進行運算,參數數量為 get_operand_count() 方法所傳回的數值
Perform the computation. The number of parameter will be the value returned by get_operand_count() method.
Returns: 運算結果 / Result of evaluation
-
-
class
Multiply(v=None, *args, **kwds)[source]¶ -
evaluate(a, b, *args)[source]¶ 進行運算,參數數量為 get_operand_count() 方法所傳回的數值
Perform the computation. The number of parameter will be the value returned by get_operand_count() method.
Returns: 運算結果 / Result of evaluation
-
-
class
Plus(v=None, *args, **kwds)[source]¶ -
evaluate(a, b, *args)[source]¶ 進行運算,參數數量為 get_operand_count() 方法所傳回的數值
Perform the computation. The number of parameter will be the value returned by get_operand_count() method.
Returns: 運算結果 / Result of evaluation
-
-
class
RegexParsePlan(regex_object, element_mapper)¶ -
element_mapper¶ Alias for field number 1
-
regex_object¶ Alias for field number 0
-
-
evaluate(fm)[source]¶ 計算由 parse_*() 函數所解析出的算式結果
Evaluate the result of parse_*() function.
Parameters: fm – 透過 parse_*() 函數所解析出的算式 / Formula object generated by parse_*() function Returns: 計算結果 / Result of evaluation