all Python 3http.clientexception
http.client.UnimplementedFileMode
exceptions
A historical exception class for an unsupported file mode. Modern http.client never raises it. A subclass of HTTPException.
Syntax
except http.client.UnimplementedFileMode: ...
It is left over from the old httplib for import compatibility: no code path in http.client raises it today, so there is no reason to catch it separately. If you need a catch-all for the module's errors, catch HTTPException; it covers this class and all the live ones.
Examples
import http.client
print(http.client.UnimplementedFileMode.__mro__[1].__name__) # → HTTPException
print('UnimplementedFileMode' in http.client.__all__) # → True — имя сохранено ради совместимости
See also
Open in the full glossarydocs.python.orgReport an inaccuracy