Python: “List.append = ‘list’ object attribute ‘append’ is read-only”
>>> list.append
<method 'append' of 'list' objects>
You're trying to modify the append
method of the built-in list
class!
Just do
docstats = []
for doc in response.results:
docstats.append(json.loads(doc['status']))
or equivalently:
docstats = [json.loads(doc['status']) for doc in response.results]