diff --git a/pymath/calculus/str2tokens.py b/pymath/calculus/str2tokens.py index 4456ea3..de06b9d 100644 --- a/pymath/calculus/str2tokens.py +++ b/pymath/calculus/str2tokens.py @@ -102,11 +102,11 @@ def in2post_fix(infix_tokens): @param infix_tokens: the infix list of tokens to transform into postfix form. @return: the corresponding postfix list of tokens. - >>> in2post_fix([op.par, 2, op.add, 5, op.sub, 1, ')', op.div, op.par, 3, op.mul, 4, ')']) + >>> in2post_fix(['(', 2, '+', 5, '-', 1, ')', '/', '(', 3, '*', 4, ')']) [2, 5, 1, '-', '+', 3, 4, '*', '/'] - >>> in2post_fix([op.sub1, op.par, op.sub1, 2, ')']) + >>> in2post_fix(['-', '(', '-', 2, ')']) [2, '-', '-'] - >>> in2post_fix([op.sub1, op.par, op.sub1, 2, op.add, 3, op.mul, 4, ')']) + >>> in2post_fix(['-', '(', '-', 2, '+', 3, '*', 4, ')']) [2, '-', 3, 4, '*', '+', '-'] """ # Stack where operator will be stocked