R. David Murray added the comment:

Robert: as noted, skipping trailing whitespace would be breaking raw_decode's 
contract.  It is designed to parse a json document and return the position of 
the last character of that document.  If there is then another json document in 
the stream, parsing the remainder of the stream would skip that whitespace.  If 
it is some other data, then the whitespace should be preserved for whatever is 
parsing the remainder of the stream (if anything).

In any case that behavior cannot be changed because it would break backward 
compatibility.

I would not object to rejecting the change, but it does make raw_decode 
slightly more awkward to use if it does not skip the leading whitespace.  So I 
guess I'm +0.5 on accepting it as is.

----------

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

Reply via email to