atom-community / atom-community/atom-script
Python eval() function produces wrong results
Open
- Dominant language
- JavaScript
- Stars
- 730
- Forks
- 264
- PR merge metrics
- No merged PRs in 30d
Description
eval("(9-2x1)/5") should return 1.4 but returns 1.
eval("(9-4x1)/7") returns 0 (?).
The x substitutes the multiplications symbol because the ordinary multiplication symbol produces an italic text and is not visible.
Not sure what the problem is but should be fixed. Thanks!
Contributor guide
Assessment
This issue has not been assessed yet.