Explorar o código

Multiplication divided by negated multiplication now also works correctly.

Taddeus Kroes %!s(int64=13) %!d(string=hai) anos
pai
achega
39cde146f9
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      line.py

+ 1 - 1
line.py

@@ -248,7 +248,7 @@ def generate_line(root):
 
         if rpred < op_pred:
             rparens = not unary_right \
-                    or (pred(right[0]) < op_pred and len(right[0]) > 1)
+                    or (op == '/' and right[0].title() in '*/')
         elif rpred == op_pred and len(right) > 1:
             if right.title() == op:
                 rparens = not is_right_assoc(op)