Skip to content

Commit be6f920

Browse files
[3.14] Fix parameter name of read_mime_types() in mimetypes docs (GH-153974) (#153978)
(cherry picked from commit c89b5ef) Co-authored-by: Raúl Santos Quirós <130504291+raul-sq@users.noreply.github.com>
1 parent 02a91ea commit be6f920

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

Doc/library/mimetypes.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,13 @@ behavior of the module.
118118
Previously, Windows registry settings were ignored.
119119

120120

121-
.. function:: read_mime_types(filename)
121+
.. function:: read_mime_types(file)
122122

123-
Load the type map given in the file *filename*, if it exists. The type map is
124-
returned as a dictionary mapping filename extensions, including the leading dot
125-
(``'.'``), to strings of the form ``'type/subtype'``. If the file *filename*
126-
does not exist or cannot be read, ``None`` is returned.
123+
Load the type map given in the file named by *file*, if it exists. *file*
124+
must be a string specifying the name of the file to read. The type map is
125+
returned as a dictionary mapping file extensions, including the leading dot
126+
(``'.'``), to strings of the form ``'type/subtype'``. If the file does not
127+
exist or cannot be read, ``None`` is returned.
127128

128129

129130
.. function:: add_type(type, ext, strict=True)

0 commit comments

Comments
 (0)