Possible bug with stability of mimetypes.guess_* function output

Peter Otten __peter__ at web.de
Sat Feb 8 08:51:48 CET 2014


Asaf Las wrote:

> On Friday, February 7, 2014 9:40:06 PM UTC+2, Peter Otten wrote:

>> You never see ".shtml" as the guessed extension because it is not in the
>> original mimetypes.types_map dict, but instead programmaticaly read from
>> a file like /etc/mime.types and then added to a list of extensions.

> as there are bunch of files in mimetypes.py the only repeatability could
> be achieved on particular machine level.

At least the mimetypes already defined in the module could easily produce 
the same guessed extension consistently.




More information about the Python-list mailing list