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

Fix cast to int via using casting to float first #57

Closed
wants to merge 1 commit into from

Conversation

usta
Copy link

@usta usta commented Dec 25, 2018

int("3.7") will give you an ValueError on the other hand whenever you cast it to float then cast it to int will fix this problem so to overcome simular issues it will be much secure to use int(float(... system

int("3.7") will give you an ValueError on the other hand whenever you cast it to float then cast it to int will fix this problem so to overcome simular issues it will be much secure to use int(float(... system
@techalchemy
Copy link
Member

Hey, thanks for the PR -- i missed this some time ago but would you mind letting me know where you're running into this? The code is kind of messy as is and I'd prefer to avoid making it messier if possible. Ideally we would do that by not passing floats in the first place

@techalchemy
Copy link
Member

Ah I see the issue, I believe I have a different approach for this

techalchemy added a commit that referenced this pull request Jan 22, 2019
- Uses existing parser built for handling complex versions
- Is sufficiently robust, should handle most circumstances
- Fixes #59
- Closes and supersedes #57

Signed-off-by: Dan Ryan <dan@danryan.co>
@techalchemy
Copy link
Member

(closed by #60 -- thanks again)

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.

2 participants