mirror of
https://github.com/python/cpython.git
synced 2025-10-22 06:32:43 +00:00
gh-111637: Clarify MIME type recognition behavior in mimetypes documentation (GH-129546)
This commit is contained in:
parent
75b628adeb
commit
bb5c6875d6
1 changed files with 5 additions and 3 deletions
|
@ -47,9 +47,11 @@ the information :func:`init` sets up.
|
||||||
The optional *strict* argument is a flag specifying whether the list of known MIME types
|
The optional *strict* argument is a flag specifying whether the list of known MIME types
|
||||||
is limited to only the official types `registered with IANA
|
is limited to only the official types `registered with IANA
|
||||||
<https://www.iana.org/assignments/media-types/media-types.xhtml>`_.
|
<https://www.iana.org/assignments/media-types/media-types.xhtml>`_.
|
||||||
When *strict* is ``True`` (the default), only the IANA types are supported; when
|
However, the behavior of this module also depends on the underlying operating
|
||||||
*strict* is ``False``, some additional non-standard but commonly used MIME types
|
system. Only file types recognized by the OS or explicitly registered with
|
||||||
are also recognized.
|
Python's internal database can be identified. When *strict* is ``True`` (the
|
||||||
|
default), only the IANA types are supported; when *strict* is ``False``, some
|
||||||
|
additional non-standard but commonly used MIME types are also recognized.
|
||||||
|
|
||||||
.. versionchanged:: 3.8
|
.. versionchanged:: 3.8
|
||||||
Added support for *url* being a :term:`path-like object`.
|
Added support for *url* being a :term:`path-like object`.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue