refactor(MO): Separate value and tree in MOs
This commit is contained in:
@@ -78,14 +78,14 @@ def mofraction(left, right):
|
||||
return MOFraction(right._numerator, right._denominator)
|
||||
|
||||
try:
|
||||
if right._numerator < 0:
|
||||
return MOFraction(-right._numerator, right._denominator)
|
||||
if right._numerator.value < 0:
|
||||
return MOFraction(-right._numerator.value, right._denominator)
|
||||
except TypeError:
|
||||
pass
|
||||
try:
|
||||
|
||||
if right._denominator < 0:
|
||||
return MOFraction(right._numerator, -right._denominator)
|
||||
if right._denominator.value < 0:
|
||||
return MOFraction(right._numerator, -right._denominator.value)
|
||||
except TypeError:
|
||||
pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user