Mark Dickinson added the comment:

In context, the doc is correct:

"""
parse_float, if specified, will be called with the string of every JSON float 
to be decoded. By default, this is equivalent to float(num_str).
"""

IIUC, parse_float only comes into play once the JSON source has already been 
tokenized, and the tokenization stage has already rejected things like '.5' by 
that point.  (The point of parse_float is that you can choose to turn numeric 
strings into decimal.Decimal instances instead of floats if you so wish.)

I agree it could use clarification.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue19871>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to