Skip to content

Commit 49cae39

Browse files
authored
gh-101021: Document binary parameters as bytes (#101024)
1 parent ef633e5 commit 49cae39

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

Doc/library/email.mime.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,9 @@ Here are the classes:
114114

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

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

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

180180
A subclass of :class:`~email.mime.nonmultipart.MIMENonMultipart`, the
181181
:class:`MIMEImage` class is used to create MIME message objects of major type
182-
:mimetype:`image`. *_imagedata* is a string containing the raw image data. If
182+
:mimetype:`image`. *_imagedata* contains the bytes for the raw image data. If
183183
this data type can be detected (jpeg, png, gif, tiff, rgb, pbm, pgm, ppm,
184184
rast, xbm, bmp, webp, and exr attempted), then the subtype will be
185185
automatically included in the :mailheader:`Content-Type` header. Otherwise

Lib/email/mime/application.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def __init__(self, _data, _subtype='octet-stream',
1717
_encoder=encoders.encode_base64, *, policy=None, **_params):
1818
"""Create an application/* type MIME document.
1919
20-
_data is a string containing the raw application data.
20+
_data contains the bytes for the raw application data.
2121
2222
_subtype is the MIME content type subtype, defaulting to
2323
'octet-stream'.

Lib/email/mime/audio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def __init__(self, _audiodata, _subtype=None,
1818
_encoder=encoders.encode_base64, *, policy=None, **_params):
1919
"""Create an audio/* type MIME document.
2020
21-
_audiodata is a string containing the raw audio data. If this data
21+
_audiodata contains the bytes for the raw audio data. If this data
2222
can be decoded as au, wav, aiff, or aifc, then the
2323
subtype will be automatically included in the Content-Type header.
2424
Otherwise, you can specify the specific audio subtype via the

Lib/email/mime/image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def __init__(self, _imagedata, _subtype=None,
1717
_encoder=encoders.encode_base64, *, policy=None, **_params):
1818
"""Create an image/* type MIME document.
1919
20-
_imagedata is a string containing the raw image data. If the data
20+
_imagedata contains the bytes for the raw image data. If the data
2121
type can be detected (jpeg, png, gif, tiff, rgb, pbm, pgm, ppm,
2222
rast, xbm, bmp, webp, and exr attempted), then the subtype will be
2323
automatically included in the Content-Type header. Otherwise, you can

0 commit comments

Comments
 (0)