Docs on multi vs. single line display of custom types #36253
Labels
display and printing
Aesthetics and correctness of printed representations of objects.
docs
This change adds or pertains to documentation
After having read https://docs.julialang.org/en/latest/manual/types/#man-custom-pretty-printing-1 I was confused as to why displaying my type
p::MyType
and a vector of such object[p, p]
both appeared to call the same three-arg method ofshow
. It appears that if both three and two-arg methodsare defined, a check is performed to see whether or not
actually prints on several lines or not, and the
is only called if the printed string spans multiple lines. This caused me quite a bit of confusion and I wonder if this is the intended behavior and needs better documentation, or if it's a bug.
Below is an example that demonstrates what's confusing.
The text was updated successfully, but these errors were encountered: