Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions Doc/library/mimetypes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,13 @@ 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*
does not exist or cannot be read, ``None`` is returned.
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 does not
exist or cannot be read, ``None`` is returned.


.. function:: add_type(type, ext, strict=True)
Expand Down
Loading