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 cooperlees, ncoghlan, serhiy.storchaka, yselivanov, zach.ware
Date 2022-02-22.18:27:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1645554422.15.0.244823839595.issue46819@roundup.psfhosted.org>
In-reply-to
Content
No, I say that

    with suppress():
        ...

is equivalent to

    try:
        ...
    except ():
        pass

or

    try:
        ...
    except BaseException as err:
        if not isinstance(err, ()):
            raise

If you want to suppress all exceptions (it is not very clever idea), use suppress(BaseException).
History
Date User Action Args
2022-02-22 18:27:02serhiy.storchakasetrecipients: + serhiy.storchaka, ncoghlan, zach.ware, yselivanov, cooperlees
2022-02-22 18:27:02serhiy.storchakasetmessageid: <1645554422.15.0.244823839595.issue46819@roundup.psfhosted.org>
2022-02-22 18:27:02serhiy.storchakalinkissue46819 messages
2022-02-22 18:27:02serhiy.storchakacreate