-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Update MIME docstring #56942
base: master
Are you sure you want to change the base?
Update MIME docstring #56942
Conversation
A type representing a standard internet data format. "MIME" stands for | ||
"Multipurpose Internet Mail Extensions", since the standard was originally | ||
used to describe multimedia attachments to email messages. | ||
A parametric type representing a standard internet data format. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A parametric type representing a standard internet data format. | |
A parametric type representing a content type/format, which is used to define [`show`](@ref) | |
methods to output objects in different formats and allows [`display(x)`](@ref) to detect | |
which formats are available for a given `x` in a particular display environment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The MIME
type is only used for the show
function? Should the docstring limit the type's usage in this way?
base/multimedia.jl
Outdated
[`@MIME_str`](@ref) is defined to simplify creation of singleton types in this way, | ||
e.g. `MIME"text/plain"`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[`@MIME_str`](@ref) is defined to simplify creation of singleton types in this way, | |
e.g. `MIME"text/plain"`. | |
The string macro [`@MIME_str`](@ref) allow you to specify `MIME{Symbol("...")}` types more succinctly | |
as `MIME"..."`, for example `MIME"text/plain"`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I slightly rewrote this.
base/multimedia.jl
Outdated
A `MIME` object can be passed as the second argument to [`show`](@ref) | ||
to request output in that format. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A `MIME` object can be passed as the second argument to [`show`](@ref) | |
to request output in that format. | |
A `mime::MIME` instance can be passed as the second argument to [`show(io, mime, x)`](@ref) | |
to request output in that format (if it is implemented for `x`), as well as to various other functions like | |
[`showable`](@ref), [`repr`](@ref), and [`display`](@ref); most such functions also allow you to | |
pass a string (e.g. `"text/plain"`) that will be converted to a `MIME` instance for you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I slightly rewrote this to avoid "you".
Co-authored-by: Steven G. Johnson <[email protected]>
Co-authored-by: Steven G. Johnson <[email protected]>
Co-authored-by: Steven G. Johnson <[email protected]>
Co-authored-by: Steven G. Johnson <[email protected]>
Co-authored-by: Steven G. Johnson <[email protected]>
Co-authored-by: Steven G. Johnson <[email protected]>
Co-authored-by: Steven G. Johnson <[email protected]>
Closes #56768