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

Broken booleans as numbers? #21919

Closed
TotalVerb opened this issue May 17, 2017 · 3 comments
Closed

Broken booleans as numbers? #21919

TotalVerb opened this issue May 17, 2017 · 3 comments
Labels
kind:bug Indicates an unexpected problem or unintended behavior

Comments

@TotalVerb
Copy link
Contributor

A recent change broke

julia> ndigits(true)
1

I'm not too fussed about this, and can understand why it didn't go through a deprecation cycle. But I was under the impression that the shift from Bool <: Integer to Bool as a separate concept has yet to happen. If so, I think it's better to continue to support integer operations on Bool.

@TotalVerb
Copy link
Contributor Author

TotalVerb commented May 17, 2017

Hmm, on further investigation it was #16841 which only changed ndigits. I had thought that there was a more comprehensive change, but the breakage of only ndigits seems like too minor an issue to care about.

@rfourquet
Copy link
Member

Sorry I was not aware I broke that one, but I agree it's too minor to fix if the plan is to switch away from Bool <: Integer.

@JeffBezanson JeffBezanson reopened this May 17, 2017
@JeffBezanson
Copy link
Sponsor Member

JeffBezanson commented May 17, 2017

I think it should be fixed. It's weird for ndigits(false) to give 1 but ndigits(true) to throw an error.

@StefanKarpinski StefanKarpinski added the kind:bug Indicates an unexpected problem or unintended behavior label May 17, 2017
JeffBezanson added a commit that referenced this issue May 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

4 participants