Test Your Knowledge: Quiz

 

 
  1. What are the two new constraints on user-defined exceptions in Python 3.0?
  2. How are raised class-based exceptions matched to handlers?
  3. Name two ways that you can attach context information to exception objects.
  4. Name two ways that you can specify the error message text for exception objects.
  5. Why should you not use string-based exceptions anymore today?