reorganise renders

This commit is contained in:
Benjamin Bertrand
2016-02-13 11:24:31 +03:00
parent a5d84e89e3
commit 589e92a780
5 changed files with 107 additions and 111 deletions

View File

@@ -7,26 +7,13 @@
from .generic import Stack, flatten_list, expand_list, isNumber, isOperator, isNumerand
from .str2tokens import str2tokens
from .operator import op
from .explicable import Explicable
from .explicable import Explicable, Explicable_int
from .random_expression import RdExpression
__all__ = ['Expression']
class Explicable_int(int, Explicable):
isNumber = True
def __init__(self, val):
super(Explicable_int, self).__init__(val)
self._val = val
self.postfix_tokens = [self]
self.steps = []
def simplify(self):
return Explicable_int(self._val)
class Expression(Explicable):
"""A calculus expression. Today it can andle only expression with numbers later it will be able to manipulate unknown"""