Skip to content

Fixing float + Decimal (Type Error) | And allowing math syntax without spaces as input #32

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ChristianTremblay
Copy link

Type Error may occur in complicated expression where float get added to Decimal. Treating float as Decimal will fix the issue.

Adding a function to add spaces in expression so 4+2 in statement.text will become valid to be tokenized.

# This 
23456.01+(2435.2/523454.324)-(52344^3+5435)^2
# Will be extracted as
23456.01 + (2435.2 / 523454.324) - (52344 ^ 3 + 5435) ^ 2

Fixed tests so Decimal and Float be compared correctly (using float...)

…to Decimal. Treating float as Decimal will fix the issue.

Adding a function to add spaces in expression so 4+2 in statement.text will become valid to be tokenized.

Fixed tests so Decimal and Float be compared correclty (using float...)
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

Successfully merging this pull request may close these issues.

1 participant