Question: PYTHON LANGUAGE def load_library(library_file_path: str) -> Library: ''' given the path to a file containing a media library, reads the details of th elibrary from

PYTHON LANGUAGE

def load_library(library_file_path: str) -> Library: ''' given the path to a file containing a media library, reads the details of th elibrary from the file and returns a library object''' one of the first things the function will do is open the specified file, so that it can read the library information from it. From a design perspective, what should this function do if opening the file fails(by raising an exception)? Select all the choices that are correct:

A. It should catch the exception and in the except clause, print a message to the user and ask the user to specific another file path instead B. It should catch the exception and in the finally clause print a message to the user and ask the user to specify another file path instead C. It should do nothing; the failure to open the file also constitutes failure of the load_library function D. Should should catch the exception, and, in the except clause, return None instead of library object E. it should catch the exception and in the finally clause, return None instead of a library object

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!