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

unsupported operand type(s) for -: 'list' and 'Integer' #168

Open
aktech opened this issue Oct 30, 2020 · 3 comments
Open

unsupported operand type(s) for -: 'list' and 'Integer' #168

aktech opened this issue Oct 30, 2020 · 3 comments

Comments

@aktech
Copy link
Member

aktech commented Oct 30, 2020

Reproduce here: https://sympygamma.com/input/?i=solve+x**2+-+4

Error:

Error:
solve x**2 - 4
unsupported operand type(s) for -: 'list' and 'Integer'
@aktech
Copy link
Member Author

aktech commented Oct 30, 2020

This is likely due to incorrect parsing, I believe the expression is parsed as:

solve(x**2) - 4

Which results in solve(x**2) returning a list, hence the error: (unsupported operand type(s) for -: 'list' and 'Integer')

@aktech
Copy link
Member Author

aktech commented Oct 31, 2020

This could also be the desired behaviour, but either ways it doesn't looks great.

@rohit11544
Copy link

solve(x**2 -4) this fixes #168

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