Skip to content

Commit

Permalink
Document the preferred use of show over display (#34438)
Browse files Browse the repository at this point in the history
One-line addition to documentation to help prevent future questions like this:

https://discourse.julialang.org/t/what-function-display-does-ijulia-call-at-the-end-of-each-cell/33554
  • Loading branch information
JeffFessler authored and StefanKarpinski committed Jan 20, 2020
1 parent 5928786 commit a3ee6fe
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions base/multimedia.jl
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,9 @@ a `MethodError` if this type is not supported by either the display(s) or by `x`
variants, one can also supply the "raw" data in the requested MIME type by passing
`x::AbstractString` (for MIME types with text-based storage, such as text/html or
application/postscript) or `x::Vector{UInt8}` (for binary MIME types).
To customize how instances of a type are displayed, overload [`show`](@ref) rather than `display`,
as explained in the manual section on [custom pretty-printing](@id man-custom-pretty-printing).
"""
function display(@nospecialize x)
for i = length(displays):-1:1
Expand Down

2 comments on commit a3ee6fe

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Executing the daily package evaluation, I will reply here when finished:

@nanosoldier runtests(ALL, isdaily = true)

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your test job has completed - possible new issues were detected. A full report can be found here. cc @maleadt

Please sign in to comment.