R. David Murray added the comment:
Agreed with Terry. The general policy in Python is that we let errors bubble
up unless there is a good reason to do something else with them. And errors
that bubble up are not, in general, documented. (In short, Python is not Java
:)
--
nosy: +r.d
Terry J. Reedy added the comment:
I disagree. The docs only sporadically mention specific exceptions for
specific functions. UnicodeDecodeError can occur any place bytes are decoded
to unicode. I think this should be closed.
Builtin exceptions are documented in
https://docs.python.org/3/li
New submission from Vasiliy Faronov:
>>> from xml.etree import ElementTree as ET
>>> ET.fromstring(b'<\xC4/>')
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python3.6/xml/etree/ElementTree.py", line 1314, in XML
parser.feed(text)
UnicodeDecodeError: 'utf-8' codec