R. David Murray added the comment:
Agreed that this is not a good API change. If this makes sense for a
particular program it is easy to write a wrapper, while the current behavior is
much more useful for typical programs. loads is not a "coercion" style call,
it is specifically parsing a st
Eric V. Smith added the comment:
What are the use cases where json.loads would be called on the return from
json.loads?
It seems to me a better design would be to wrap such calls with a test, instead
of having json.loads do this test. Hiding it in json.loads would mask other
programming error
New submission from CT Radu:
Currently, json.loads expects a string as input and is expected to return a
dictionary or raise an exception.
Proposal:
If the first argument of json.loads is a dictionary
return that dictionary, instead of raising a TypeError as it happens now.
There are some use