Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on On incomplete HTTP reads and the requests library in Python. Parent comment
Altough I really like requests, this is a violation of one of the PEP 20 heuristics:
Errors should never pass silently. Unless explicitly silenced.
https://www.python.org/dev/peps/pep-0020/
An exception would be an elegant way to handle the problem and would be able to retain the incomplete data to be handeled. It's exactly what they are for. The exception could be the default to prevent surprises, possible deactivated with a flag.
There are no comments on this comment yet.
Altough I really like requests, this is a violation of one of the PEP 20 heuristics:
Errors should never pass silently. Unless explicitly silenced.
https://www.python.org/dev/peps/pep-0020/
An exception would be an elegant way to handle the problem and would be able to retain the incomplete data to be handeled. It's exactly what they are for. The exception could be the default to prevent surprises, possible deactivated with a flag.