Hello,
Consider the following:
>>> expr=input('Enter a mathematical expression: ')
Enter a mathematical expression: x**2 + 3x + x**3 + 2x
>>> expr = sympify(expr)
Traceback (most recent call last):
File "<pyshell#146>", line 1, in <module>
expr = sympify(expr)
File "/usr/lib/python3.3/site-packages/sympy/core/sympify.py", line
180, in sympify
raise SympifyError('could not parse %r' % a)
sympy.core.sympify.SympifyError: SympifyError: "could not parse 'x**2
+ 3x + x**3 + 2x'"
Is it possible to get a more specific error message here? Like which
of the terms are invalid, for example?
Thanks,
Amit.
--
http://echorand.me