no more float ready for decimal!
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
# encoding: utf-8
|
||||
|
||||
from .render import Renderable
|
||||
from decimal import Decimal
|
||||
|
||||
|
||||
class Explicable(Renderable):
|
||||
@@ -79,18 +80,18 @@ class Explicable_int(int, Explicable):
|
||||
def __tex__(self):
|
||||
return str(self._val)
|
||||
|
||||
class Explicable_float(float, Explicable):
|
||||
""" An Explicable_float is an float which can be explain """
|
||||
class Explicable_Decimal(Decimal, Explicable):
|
||||
""" An Explicable_Decimal is an decimal which can be explain """
|
||||
isNumber = True
|
||||
|
||||
def __init__(self, val):
|
||||
super(Explicable_float, self).__init__(val)
|
||||
super(Explicable_Decimal, self).__init__(val)
|
||||
self._val = val
|
||||
self.postfix_tokens = [self]
|
||||
self.steps = []
|
||||
|
||||
def simplify(self):
|
||||
return Explicable_float(self._val)
|
||||
return Explicable_Decimal(self._val)
|
||||
|
||||
def __txt__(self):
|
||||
return str(self._val)
|
||||
|
Reference in New Issue
Block a user