Indicating Unimplemented Features with NotImplementedError
NotImplementedError is an exception used to indicate that a certain feature has not been implemented yet.
It is primarily used during the development process to mark functionalities that will be implemented later.
Example Usage of NotImplementedError
number = 11 if number > 10: raise NotImplementedError("Handling for numbers greater than 10 is not yet implemented") else: print("The number is 10 or less.")
In the code example above, if the variable number exceeds 10, a NotImplementedError is raised.
In this case, the NotImplementedError clearly states that handling for numbers greater than 10 is not yet implemented
Similar to the pass keyword, NotImplementedErroris used to mark functions that will be implemented in the future but more explicitly conveys the necessity of implementation.
Quiz
0 / 1
NotImplementedError does nothing when called.
True
False
Lecture
AI Tutor
Design
Upload
Notes
Favorites
Help
Code Editor
Run
Generate
Execution Result