Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:
Normally, we don't (or can't) enumerate all possible exceptions. But in this case, it is worth expanding the documentation so that person can know which of two common input errors they need to catch: "If the data being deserialized is not valid UTF-8 a UnicodeDecodeError will be raised, and if the decoded file is not a valid JSON document, a JSONDecodeError will be raised". ---------- assignee: docs@python -> rhettinger nosy: +rhettinger _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue43340> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com