From 7987f3f1be92ba22b532618f208824b00052a934 Mon Sep 17 00:00:00 2001 From: Lafrite Date: Tue, 21 Apr 2015 17:31:56 +0200 Subject: [PATCH] add debug tool --- pymath/expression.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pymath/expression.py b/pymath/expression.py index ab85243..5d1e8d7 100644 --- a/pymath/expression.py +++ b/pymath/expression.py @@ -1,6 +1,9 @@ #!/usr/bin/env python # encoding: utf-8 +#debuging +#from debug.tools import report + from .generic import Stack, flatten_list, expand_list, isNumber, isOperator, isNumerand from .str2tokens import str2tokens from .operator import op @@ -347,10 +350,10 @@ def untest(exp): if __name__ == '__main__': #print('\n') - A = Expression.random("( -8 x + 8 ) ( -8 - ( -6 x ) )") + A = Expression("( -8 x + 8 ) ( -8 - ( -6 x ) )") Ar = A.simplify() #print("Ar.steps -> ", Ar.steps) - for i in Ar.steps: + for i in Ar.explain(): print(i) #print("------------") #for i in Ar.explain(): @@ -360,7 +363,7 @@ if __name__ == '__main__': print('\n-----------') - A = Expression.random("2 / 3 + 4 / 5") + A = Expression("2 / 3 + 4 / 5") Ar = A.simplify() #print("Ar.steps -> ", Ar.steps) #for i in Ar.steps: