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

Avoid printing empty NamedTuples like empty tuples #846

Closed
andreasnoack opened this issue Oct 12, 2022 · 2 comments
Closed

Avoid printing empty NamedTuples like empty tuples #846

andreasnoack opened this issue Oct 12, 2022 · 2 comments

Comments

@andreasnoack
Copy link

It can be pretty confusing

julia> (;)
()

julia> ()
()

julia> (;) == ()
false

so it would nice to print the empty case as NamedTuple().

@ablaom
Copy link
Member

ablaom commented Oct 12, 2022

Makes sense. I expect the change would happen around about here:

Base.show(stream::IO, ::MIME"text/plain", t::NamedTuple) = fancy_nt(stream, t)

@ablaom
Copy link
Member

ablaom commented Oct 12, 2022

In #841 items returned by report(mach) and fitted_params(mach) with empty named tuple values (or nothing) are dropped.

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

No branches or pull requests

2 participants