Skip to content

Commit 3ae1c6d

Browse files
committed
GH-101021: Document binary parameters as bytes
The existing documentation refers to binary parameters as "strings" when they are actually bytes. Fixes #101021
1 parent ef633e5 commit 3ae1c6d

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

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)