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

gh-101021: Document binary parameters as bytes #101024

Merged
merged 1 commit into from
Jan 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Doc/library/email.mime.rst
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ Here are the classes:

A subclass of :class:`~email.mime.nonmultipart.MIMENonMultipart`, the
:class:`MIMEApplication` class is used to represent MIME message objects of
major type :mimetype:`application`. *_data* is a string containing the raw
byte data. Optional *_subtype* specifies the MIME subtype and defaults to
:mimetype:`octet-stream`.
major type :mimetype:`application`. *_data* contains the bytes for the raw
application data. Optional *_subtype* specifies the MIME subtype and defaults
to :mimetype:`octet-stream`.

Optional *_encoder* is a callable (i.e. function) which will perform the actual
encoding of the data for transport. This callable takes one argument, which is
Expand Down Expand Up @@ -145,7 +145,7 @@ Here are the classes:

A subclass of :class:`~email.mime.nonmultipart.MIMENonMultipart`, the
:class:`MIMEAudio` class is used to create MIME message objects of major type
:mimetype:`audio`. *_audiodata* is a string containing the raw audio data. If
:mimetype:`audio`. *_audiodata* contains the bytes for the raw audio data. If
this data can be decoded as au, wav, aiff, or aifc, then the
subtype will be automatically included in the :mailheader:`Content-Type` header.
Otherwise you can explicitly specify the audio subtype via the *_subtype*
Expand Down Expand Up @@ -179,7 +179,7 @@ Here are the classes:

A subclass of :class:`~email.mime.nonmultipart.MIMENonMultipart`, the
:class:`MIMEImage` class is used to create MIME message objects of major type
:mimetype:`image`. *_imagedata* is a string containing the raw image data. If
:mimetype:`image`. *_imagedata* contains the bytes for the raw image data. If
this data type can be detected (jpeg, png, gif, tiff, rgb, pbm, pgm, ppm,
rast, xbm, bmp, webp, and exr attempted), then the subtype will be
automatically included in the :mailheader:`Content-Type` header. Otherwise
Expand Down
2 changes: 1 addition & 1 deletion Lib/email/mime/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def __init__(self, _data, _subtype='octet-stream',
_encoder=encoders.encode_base64, *, policy=None, **_params):
"""Create an application/* type MIME document.

_data is a string containing the raw application data.
_data contains the bytes for the raw application data.
warsaw marked this conversation as resolved.
Show resolved Hide resolved

_subtype is the MIME content type subtype, defaulting to
'octet-stream'.
Expand Down
2 changes: 1 addition & 1 deletion Lib/email/mime/audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def __init__(self, _audiodata, _subtype=None,
_encoder=encoders.encode_base64, *, policy=None, **_params):
"""Create an audio/* type MIME document.

_audiodata is a string containing the raw audio data. If this data
_audiodata contains the bytes for the raw audio data. If this data
can be decoded as au, wav, aiff, or aifc, then the
subtype will be automatically included in the Content-Type header.
Otherwise, you can specify the specific audio subtype via the
Expand Down
2 changes: 1 addition & 1 deletion Lib/email/mime/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def __init__(self, _imagedata, _subtype=None,
_encoder=encoders.encode_base64, *, policy=None, **_params):
"""Create an image/* type MIME document.

_imagedata is a string containing the raw image data. If the data
_imagedata contains the bytes for the raw image data. If the data
type can be detected (jpeg, png, gif, tiff, rgb, pbm, pgm, ppm,
rast, xbm, bmp, webp, and exr attempted), then the subtype will be
automatically included in the Content-Type header. Otherwise, you can
Expand Down