gh-101021: Document binary parameters as bytes (#101024)

This commit is contained in:
Bob Kline 2023-01-14 14:01:27 -05:00 committed by GitHub
parent ef633e5000
commit 49cae39ef0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 8 deletions

View file

@ -114,9 +114,9 @@ Here are the classes:
A subclass of :class:`~email.mime.nonmultipart.MIMENonMultipart`, the A subclass of :class:`~email.mime.nonmultipart.MIMENonMultipart`, the
:class:`MIMEApplication` class is used to represent MIME message objects of :class:`MIMEApplication` class is used to represent MIME message objects of
major type :mimetype:`application`. *_data* is a string containing the raw major type :mimetype:`application`. *_data* contains the bytes for the raw
byte data. Optional *_subtype* specifies the MIME subtype and defaults to application data. Optional *_subtype* specifies the MIME subtype and defaults
:mimetype:`octet-stream`. to :mimetype:`octet-stream`.
Optional *_encoder* is a callable (i.e. function) which will perform the actual 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 encoding of the data for transport. This callable takes one argument, which is
@ -145,7 +145,7 @@ Here are the classes:
A subclass of :class:`~email.mime.nonmultipart.MIMENonMultipart`, the A subclass of :class:`~email.mime.nonmultipart.MIMENonMultipart`, the
:class:`MIMEAudio` class is used to create MIME message objects of major type :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 this data can be decoded as au, wav, aiff, or aifc, then the
subtype will be automatically included in the :mailheader:`Content-Type` header. subtype will be automatically included in the :mailheader:`Content-Type` header.
Otherwise you can explicitly specify the audio subtype via the *_subtype* Otherwise you can explicitly specify the audio subtype via the *_subtype*
@ -179,7 +179,7 @@ Here are the classes:
A subclass of :class:`~email.mime.nonmultipart.MIMENonMultipart`, the A subclass of :class:`~email.mime.nonmultipart.MIMENonMultipart`, the
:class:`MIMEImage` class is used to create MIME message objects of major type :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, 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 rast, xbm, bmp, webp, and exr attempted), then the subtype will be
automatically included in the :mailheader:`Content-Type` header. Otherwise automatically included in the :mailheader:`Content-Type` header. Otherwise

View file

@ -17,7 +17,7 @@ class MIMEApplication(MIMENonMultipart):
_encoder=encoders.encode_base64, *, policy=None, **_params): _encoder=encoders.encode_base64, *, policy=None, **_params):
"""Create an application/* type MIME document. """Create an application/* type MIME document.
_data is a string containing the raw application data. _data contains the bytes for the raw application data.
_subtype is the MIME content type subtype, defaulting to _subtype is the MIME content type subtype, defaulting to
'octet-stream'. 'octet-stream'.

View file

@ -18,7 +18,7 @@ class MIMEAudio(MIMENonMultipart):
_encoder=encoders.encode_base64, *, policy=None, **_params): _encoder=encoders.encode_base64, *, policy=None, **_params):
"""Create an audio/* type MIME document. """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 can be decoded as au, wav, aiff, or aifc, then the
subtype will be automatically included in the Content-Type header. subtype will be automatically included in the Content-Type header.
Otherwise, you can specify the specific audio subtype via the Otherwise, you can specify the specific audio subtype via the

View file

@ -17,7 +17,7 @@ class MIMEImage(MIMENonMultipart):
_encoder=encoders.encode_base64, *, policy=None, **_params): _encoder=encoders.encode_base64, *, policy=None, **_params):
"""Create an image/* type MIME document. """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, type can be detected (jpeg, png, gif, tiff, rgb, pbm, pgm, ppm,
rast, xbm, bmp, webp, and exr attempted), then the subtype will be rast, xbm, bmp, webp, and exr attempted), then the subtype will be
automatically included in the Content-Type header. Otherwise, you can automatically included in the Content-Type header. Otherwise, you can