File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -271,7 +271,7 @@ def calc_iteration(expression):
271271 stack .append (a ** b )
272272 else :
273273 stack .append (i )
274- expression .remove (( i ) )
274+ expression .remove (i )
275275 if i in ops_list :
276276 arg = []
277277 ops , arg0 = get_arguments (expression )
@@ -332,8 +332,8 @@ def to_postfix(expression):
332332 ops_bracket .pop ()
333333 res .append (i )
334334 elif i in binary_operations :
335- if stack and stack [- 1 ] in binary_operations and binary_operations [ stack [ - 1 ]] >= binary_operations [
336- i ] and i != '^' :
335+ if stack and stack [- 1 ] in binary_operations and \
336+ binary_operations [ stack [ - 1 ]] >= binary_operations [ i ] and i != '^' :
337337 while stack and stack [- 1 ] in binary_operations and binary_operations [stack [- 1 ]] >= binary_operations [i ]:
338338 res .append (stack .pop ())
339339 stack .append (i )
You can’t perform that action at this time.
0 commit comments