Author michael-lazar
Recipients The Compiler, ammar2, dhess, michael-lazar, r.david.murray, steve.dower, toonn, xtreak
Date 2020-07-17.03:14:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1594955690.16.0.436925432584.issue38656@roundup.psfhosted.org>
In-reply-to
Content
Greetings,

I just encountered this issue [0] and I agree with the sentiment that the documentation is currently misleading.

Particularly,

> By default, it provides access to the same database as the rest of this module. The initial database is a copy of that provided by the module, and may be extended by loading additional mime.types-style files into the database using the read() or readfp() methods. The mapping dictionaries may also be cleared before loading additional data if the default data is not desired.

“as the rest of the module” implies to me that it should behave the same way as mimetypes.guess_type() does. The documentation only has one other reference to this built-in list of mimetypes, and the default values are hidden behind underscored variable names. I would re-word this as

"By default, it provides access to a database of well-known values defined internally by the python module. Unlike the other mimetypes convenience functions, it does not include definitions from the list of mimetypes.knownfiles. The initial database may be extended by loading additional mime.types-style files into the database using the read() or readfp() methods. The mapping dictionaries may also be cleared before loading additional data if the default data is not desired."

I would be happy to submit a PR if others agree.

[0] https://github.com/michael-lazar/jetforce/issues/38
History
Date User Action Args
2020-07-17 03:14:50michael-lazarsetrecipients: + michael-lazar, r.david.murray, steve.dower, The Compiler, ammar2, dhess, xtreak, toonn
2020-07-17 03:14:50michael-lazarsetmessageid: <1594955690.16.0.436925432584.issue38656@roundup.psfhosted.org>
2020-07-17 03:14:50michael-lazarlinkissue38656 messages
2020-07-17 03:14:49michael-lazarcreate