Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

toString() it's not working with negative numbers #27

Open
magdy-zon opened this issue Sep 12, 2017 · 1 comment
Open

toString() it's not working with negative numbers #27

magdy-zon opened this issue Sep 12, 2017 · 1 comment

Comments

@magdy-zon
Copy link

Hi my friend!

I was working perfectly with your library until I had a trouble with a simple example:
When I was trying to parse '-1' I do:

>>> parser.parse('-1').toString()

Shows an error:
Traceback (most recent call last):
File "", line 1, in
File "/Library/Python/2.7/site-packages/py_expression_eval/init.py", line 185, in toString
nstack.append('(' + f + n1 + ')')
TypeError: cannot concatenate 'str' and 'float' objects

Thanks for read my issue and have good code lines.

@flotwig
Copy link
Contributor

flotwig commented May 5, 2018

A similar issue happens when you try to use toString() on an expression that uses functions, it says that TypeError: must be str, not float on line 187.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants