Summer Certification Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: force70

Python Institute PCPP1 – Certified Professional in Python Programming 1 PCPP-32-101 Question # 4 Topic 1 Discussion

Python Institute PCPP1 – Certified Professional in Python Programming 1 PCPP-32-101 Question # 4 Topic 1 Discussion

PCPP-32-101 Exam Topic 1 Question 4 Discussion:
Question #: 4
Topic #: 1

Select the true statements related to PEP 8 programming recommendations for exception handling. (Select two answers.)


A.

When designing exception hierarchies, you should focus on stating that a problem occurred, rather than programmatically trying to answer the question about what actually went wrong.


B.

You should generally use “bare” except: clauses, as they will not catch SystemExit and KeyboardInterrupt exceptions, making it more difficult to interrupt a program using keyboard shortcuts.


C.

You should derive exceptions from the Exception class, rather than from the BaseException class.


D.

You should generally limit the use of a “bare” except: clause and, whenever possible, use specific exceptions instead.


Get Premium PCPP-32-101 Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.