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

Use short <: printing when showing signatures #27676

Closed
Keno opened this issue Jun 20, 2018 · 4 comments
Closed

Use short <: printing when showing signatures #27676

Keno opened this issue Jun 20, 2018 · 4 comments
Labels
display and printing Aesthetics and correctness of printed representations of objects.

Comments

@Keno
Copy link
Member

Keno commented Jun 20, 2018

julia> f(x::Type{<:Any}) = 1
f (generic function with 1 method)

julia> first(methods(f))
f(x::Type{#s1} where #s1) in Main at REPL[4]:1

It would be nice to print the signature as

f(x::Type{<:Any}) in Main at REPL[4]:1
@JeffBezanson JeffBezanson added the display and printing Aesthetics and correctness of printed representations of objects. label Jun 20, 2018
@visr
Copy link
Contributor

visr commented Jun 20, 2018

Ah is this a different path than #23464?

@JeffBezanson
Copy link
Member

Yes; that handled showing expressions, this is for showing the corresponding types themselves.

@o314
Copy link
Contributor

o314 commented Oct 23, 2019

For quick ref, those changes seem to come from #6984 and #20414

@laborg
Copy link
Contributor

laborg commented Oct 16, 2023

This has been implemented:

julia> f(x::Type{<:Any}) = 1
f (generic function with 1 method)

julia> first(methods(f))
f(x::Type)
     @ Main REPL[2]:1

julia> g(x::Type{<:Real}) = 1
g (generic function with 1 method)

julia> first(methods(g))
g(x::Type{<:Real})
     @ Main REPL[4]:1

@laborg laborg closed this as completed Oct 16, 2023
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

5 participants