Doc(API): Adapt doctest to new computing order

This commit is contained in:
Bertrand Benjamin 2018-11-19 15:46:39 +01:00
parent 4999e80ec3
commit b4f9ced8a9
1 changed files with 4 additions and 1 deletions

View File

@ -80,12 +80,15 @@ x^7
2x + 3x + 2 2x + 3x + 2
(2 + 3) * x + 2 (2 + 3) * x + 2
5x + 2 5x + 2
>>> e = Expression.from_str("2x^2+2x+3x")
>>> e_simplified = e.simplify()
""" """
from .expression import Expression from .expression import Expression
if __name__ == "__main__": if __name__ == "__main__":
e = Expression.from_str("2x+2+3x") e = Expression.from_str("2x^2+3x+4x^2")
print(e) print(e)
e_simplified = e.simplify() e_simplified = e.simplify()
print(e_simplified) print(e_simplified)