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

Don't allow underscores when doing base conversion #48

Closed
dloscutoff opened this issue Jan 27, 2022 · 0 comments
Closed

Don't allow underscores when doing base conversion #48

dloscutoff opened this issue Jan 27, 2022 · 0 comments
Labels
minor-bug Not ideal behavior, but doesn't break anything.

Comments

@dloscutoff
Copy link
Owner

It turns out that Python 3 allows underscores in strings representing base-N numbers: int("a_b_c", 16) results in 2748, the same as int("abc", 16) does. This is undesirable behavior for Pip; underscores in the left argument of FB should give a result of nil, just like any other character that isn't a digit in the given base. I think the implementation of FROMBASE will have to check for underscores explicitly.

@dloscutoff dloscutoff added the minor-bug Not ideal behavior, but doesn't break anything. label Jan 27, 2022
dloscutoff added a commit that referenced this issue Mar 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor-bug Not ideal behavior, but doesn't break anything.
Projects
None yet
Development

No branches or pull requests

1 participant