What is ExceptionGroup in Python 3.11+ and how does except* differ from except?

Python Professional Hard

Python Professional — Hard

What is ExceptionGroup in Python 3.11+ and how does except* differ from except?

Key points

  • ExceptionGroup bundles multiple exceptions
  • except* targets specific exceptions within the group
  • Unmatched exceptions are allowed to propagate
  • Provides precise error handling
  • Ensures efficient exception management

Ready to go further?

Related questions