diff options
Diffstat (limited to 'polymatrix/expression/init/initevalexpr.py')
-rw-r--r-- | polymatrix/expression/init/initevalexpr.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/polymatrix/expression/init/initevalexpr.py b/polymatrix/expression/init/initevalexpr.py new file mode 100644 index 0000000..deeb4e9 --- /dev/null +++ b/polymatrix/expression/init/initevalexpr.py @@ -0,0 +1,21 @@ +from tkinter import Variable +from polymatrix.expression.mixins.expressionbasemixin import ExpressionBaseMixin +from polymatrix.expression.impl.evalexprimpl import EvalExprImpl + + +def init_eval_expr( + underlying: ExpressionBaseMixin, + variables: tuple, + eval_values: tuple, +): + if not isinstance(variables, tuple): + variables = (variables,) + + if not isinstance(eval_values, tuple): + eval_values = (eval_values,) + + return EvalExprImpl( + underlying=underlying, + variables=variables, + eval_values=eval_values, +) |