Author xtreak
Recipients Daniel Black, r.david.murray, xtreak
Date 2019-04-03.12:35:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1554294910.71.0.354186506525.issue36489@roundup.psfhosted.org>
In-reply-to
Content
> However this seems to compete with the functionality of the types map so another consideration is content-types_map where the content-type is the key and the pair values are lists of valid filename extensions:

There is mimetypes.MimeTypes().types_map_inv

> https://docs.python.org/3.8/library/mimetypes.html#mimetypes.MimeTypes.types_map_inv
> Tuple containing two dictionaries, mapping MIME types to a list of filename extensions: the first dictionary is for the non-standards types and the second one is for the standard types. They are initialized by common_types and types_map.

>>> mimetypes.MimeTypes().types_map_inv[1]['text/html']
['.htm', '.html']
History
Date User Action Args
2019-04-03 12:35:10xtreaksetrecipients: + xtreak, r.david.murray, Daniel Black
2019-04-03 12:35:10xtreaksetmessageid: <1554294910.71.0.354186506525.issue36489@roundup.psfhosted.org>
2019-04-03 12:35:10xtreaklinkissue36489 messages
2019-04-03 12:35:10xtreakcreate