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

Line break after show(to)? #153

Closed
wcwitt opened this issue May 5, 2022 · 2 comments
Closed

Line break after show(to)? #153

wcwitt opened this issue May 5, 2022 · 2 comments

Comments

@wcwitt
Copy link
Contributor

wcwitt commented May 5, 2022

Thanks a lot for the package. Would you be opposed to having a line break at the end of show(to)? It is mildly annoying to have

# test.jl

using TimerOutputs
to = TimerOutput()
show(to)
println("print this line")

produce

 ────────────────────────────────────────────────────────────────────
                            Time                    Allocations
                   ───────────────────────   ────────────────────────
 Tot / % measured:      643ms /   0.0%           38.4MiB /   0.0%

 Section   ncalls     time    %tot     avg     alloc    %tot      avg
 ────────────────────────────────────────────────────────────────────
 ────────────────────────────────────────────────────────────────────print this line
@fredrikekre
Copy link
Contributor

I don't think it should, compare with e.g.

julia> show([1, 2, 3]); println("print this line")
[1, 2, 3]print this line

@wcwitt
Copy link
Contributor Author

wcwitt commented May 5, 2022

Ah, I agree with the consistency point. And I see now that both

julia> println(to); println("print this line")

and

julia> print_timer(to); println("print this line")

do what I want. Nevermind, then - sorry.

@wcwitt wcwitt closed this as completed May 5, 2022
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