This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients ShlomiRex, serhiy.storchaka
Date 2021-09-09.16:10:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1631203833.17.0.903177332234.issue45153@roundup.psfhosted.org>
In-reply-to
Content
Expression `A or B` gets you A if A is true.

If you want to catch several types of exception by one "except", use except with a tuple:

    except (ConnectionResetError, ConnectionAbortedError):
History
Date User Action Args
2021-09-09 16:10:33serhiy.storchakasetrecipients: + serhiy.storchaka, ShlomiRex
2021-09-09 16:10:33serhiy.storchakasetmessageid: <1631203833.17.0.903177332234.issue45153@roundup.psfhosted.org>
2021-09-09 16:10:33serhiy.storchakalinkissue45153 messages
2021-09-09 16:10:33serhiy.storchakacreate