A context manager's _______ method should return a Boolean value to control whether or not exceptions should be suppressed.

  • __close__
  • __enter__
  • __exit__
  • __manage__
A context manager's __exit__ method should return a Boolean value indicating whether exceptions should be suppressed (True) or propagated (False). It's responsible for handling exceptions within the context.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *