clarify that :compact prohibition on line breaks is for 2-arg show #55489
All Vouch review confidence checks passed
Residual risk 0.03 = Change Risk (0.17) × (1 − Review Confidence (0.83)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.17 · 2 lines diff across 1 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.89 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.066
Real PR Conversation Timeline
2 items
elements. `:compact` output should not contain line breaks.
This flag may be ignored for 3-argument [`show(io, mime, x)`](@ref).
I guess that this is what
show for arrays and dictionaries does at present (apart from passing :compact on to the elements). It would also keep readers from asking themselves what "compact output with line breaks" may look like.As expressed in the referenced Discourse thread, I would personally find a compact (human-readable) 3-argument show version quite useful. For this reason I suggest to add
Nevertheless, users are encouraged to take the `:compact` flag into account
when writing 3-argument `show` methods for the `"text/plain"` MIME type.
matthias314
stevengj
The docs say that
:compact=>truein theIOContextmeans that the output should not contain line breaks. Clarify that this is for the 2-argumentshow(io, x)output.(As opposed to 3-arg
show, whose whole purpose has always been to enable verbose multi-line display, and which is normally only called at the top level bydisplay, not for nested objects).See also this discourse thread.