Nov-30-2020, 09:46 AM
(This post was last modified: Nov-30-2020, 09:46 AM by Gribouillis.)
Yes, you're right but this is not related to the
Here is an example of suppressed exception
__exit__
method.Here is an example of suppressed exception
>>> class A: ... def __enter__(self): pass ... def __exit__(self, *args): return True ... >>> with A(): ... 1/0 ... >>>