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

Pretty printing when examining a type object in the repl #2620

Closed
astrieanna opened this issue Mar 19, 2013 · 2 comments
Closed

Pretty printing when examining a type object in the repl #2620

astrieanna opened this issue Mar 19, 2013 · 2 comments

Comments

@astrieanna
Copy link
Contributor

Calling dump on a type object gives non-useful output:

julia> dump(Response)
Response

On an instantiation of that type, it's a lot more useful:

julia> r = Response(404)
Response(404,"Not Found",["Server"=>"Julia/0.2.0-606.rdcd0"],"",false)

julia> dump(r)
Response 
  status: Int32 
  message: ASCIIString "Not Found"
  headers: Dict{String,String} len 1
    Server: ASCIIString "Julia/0.2.0-606.rdcd0"
  data: ASCIIString ""
  finished: Bool 

dump on a type object should do something similar to on the instantiation.
Something like:

julia> dump(Response)
Response 
  status: Int32 
  message: ASCIIString
  headers: Dict{String,String}
  data: ASCIIString
  finished: Bool 
@JeffBezanson
Copy link
Sponsor Member

Now xdump(type) should work well. For some reason dump shows less than xdump in this case. Maybe @tshort or @pao can advise.

@pao
Copy link
Member

pao commented Mar 19, 2013

I'm pretty sure all I did was wrangle the patches for that one.

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

3 participants