Python: 添加新的 mimetype

Python: add a new mimetype

如何使用 mimetypes 包中的 add_type() 函数添加新的 mimetype?我需要对 python 文件系统做些什么吗?如果我尝试类似的操作:add_type('text/new', 'new') 似乎没有任何反应。

扩展名前面需要有一个句点。 add_type('text/new', '.new') 有效。