[New-bugs-announce] [issue18680] JSONDecoder should document that it raises a ValueError for malformed data

Corey Farwell report at bugs.python.org
Thu Aug 8 00:06:31 CEST 2013


New submission from Corey Farwell:

Before someone comes in and tries to correct me, I know Python documentation is different than Javadocs. It is common to test if the JSON is malformed using a try...catch. What if I want to catch something more specific than Exception? The only way a user would know what to catch is to `python -c "import json; json.loads('FAIL')"`. Many other Python modules document which exception is raised on invalid input/parameters.

----------
assignee: docs at python
components: Documentation
messages: 194628
nosy: corey, docs at python
priority: normal
severity: normal
status: open
title: JSONDecoder should document that it raises a ValueError for malformed data
type: enhancement
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18680>
_______________________________________


More information about the New-bugs-announce mailing list