From b7353c3c150553f0993509098d8823e21d06ad10 Mon Sep 17 00:00:00 2001 From: raul-sq Date: Sat, 18 Jul 2026 15:58:48 +0200 Subject: [PATCH 1/2] Fix parameter name of read_mime_types() in mimetypes docs --- Doc/library/mimetypes.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Doc/library/mimetypes.rst b/Doc/library/mimetypes.rst index 5c29fff146eef0..f15d3cbec88cd1 100644 --- a/Doc/library/mimetypes.rst +++ b/Doc/library/mimetypes.rst @@ -116,11 +116,11 @@ behavior of the module. Previously, Windows registry settings were ignored. -.. function:: read_mime_types(filename) +.. function:: read_mime_types(file) - Load the type map given in the file *filename*, if it exists. The type map is - returned as a dictionary mapping filename extensions, including the leading dot - (``'.'``), to strings of the form ``'type/subtype'``. If the file *filename* + Load the type map given in the file *file*, if it exists. The type map is + returned as a dictionary mapping file extensions, including the leading dot + (``'.'``), to strings of the form ``'type/subtype'``. If the file *file* does not exist or cannot be read, ``None`` is returned. From f9248467e73bb128df6fafc91e5ad533baffb036 Mon Sep 17 00:00:00 2001 From: raul-sq Date: Sat, 18 Jul 2026 16:18:33 +0200 Subject: [PATCH 2/2] Further explanation of the format of the object received by the function read_mime_types --- Doc/library/mimetypes.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Doc/library/mimetypes.rst b/Doc/library/mimetypes.rst index f15d3cbec88cd1..f6cfbb5126158e 100644 --- a/Doc/library/mimetypes.rst +++ b/Doc/library/mimetypes.rst @@ -118,10 +118,11 @@ behavior of the module. .. function:: read_mime_types(file) - Load the type map given in the file *file*, if it exists. The type map is + Load the type map given in the file named by *file*, if it exists. *file* + must be a string specifying the name of the file to read. The type map is returned as a dictionary mapping file extensions, including the leading dot - (``'.'``), to strings of the form ``'type/subtype'``. If the file *file* - does not exist or cannot be read, ``None`` is returned. + (``'.'``), to strings of the form ``'type/subtype'``. If the file does not + exist or cannot be read, ``None`` is returned. .. function:: add_type(type, ext, strict=True)