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

pairs of a NamedTuple shows bools as 1/0 even though no type info is shown #54126

Open
KristofferC opened this issue Apr 18, 2024 · 0 comments
Open
Labels
display and printing Aesthetics and correctness of printed representations of objects.

Comments

@KristofferC
Copy link
Sponsor Member

Showing booleans as 1/0 should (AFAIU) only be done when there is type context to see that the integer is in fact a bool, but in this case that does not seem to be the case:

julia> pairs((; mmap=true))
pairs(::NamedTuple) with 1 entry:
  :mmap => 1

julia> typeof(ans)
Base.Pairs{Symbol, Bool, Tuple{Symbol}, @NamedTuple{mmap::Bool}}
@KristofferC KristofferC added the display and printing Aesthetics and correctness of printed representations of objects. label Apr 18, 2024
@KristofferC KristofferC changed the title pairs of a NamedTuple shows bools with integer even though no type info is shown pairs of a NamedTuple shows bools as 1/0 even though no type info is shown Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
display and printing Aesthetics and correctness of printed representations of objects.
Projects
None yet
Development

No branches or pull requests

1 participant