try... except with unknown error types

Chris Angelico rosuav at gmail.com
Sun Aug 21 20:41:47 EDT 2011


On Mon, Aug 22, 2011 at 1:30 AM, Steven D'Aprano
<steve+comp.lang.python at pearwood.info> wrote:
> /s/would/should/
>
> I don't see why you expect this, when *existing* network-related failures
> aren't

Ehh, granted. Definitely a case of "should". But certainly, there
won't be an infinite number of new exceptions invented; most of the
runtime issues you'll have will fall into a fairly small number of
exception types (either by subclassing or by parameters eg errno).

ChrisA



More information about the Python-list mailing list