Skip to content

Commit fd670bc

Browse files
committed
pythonGH-101021: Document binary parameters as bytes
The existing documentation refers to binary parameters as "strings" when they are actually bytes. Fixes python#101021
1 parent 1bc7a73 commit fd670bc

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎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)