solve bug in polynom with Expression.set_render
This commit is contained in:
parent
09ceb07f41
commit
a4a58f05a0
@ -20,6 +20,10 @@ class Expression(object):
|
||||
def set_render(cls, render):
|
||||
cls.STR_RENDER = render
|
||||
|
||||
@classmethod
|
||||
def get_render(cls ):
|
||||
return cls.STR_RENDER
|
||||
|
||||
@classmethod
|
||||
def set_default_render(cls):
|
||||
cls.set_render(cls.DEFAULT_RENDER)
|
||||
|
@ -254,9 +254,10 @@ class Polynom(object):
|
||||
# On converti en Expression
|
||||
coef_exp = Expression(postfix_add)
|
||||
|
||||
old_render = Expression.get_render()
|
||||
Expression.set_render(lambda _,x:Expression(x))
|
||||
coef_steps = list(coef_exp.simplify())
|
||||
Expression.set_default_render()
|
||||
Expression.set_render(old_render)
|
||||
|
||||
elif type(coef) == Expression:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user