NotImplementedError

Built-in ExceptionPython 2.0+Intermediate

Raised to indicate an abstract method must be overridden

Quick Info

Documentation
Official Docs
Python Version
2.0+

Learn by Difficulty

Quick Example

python
# Triggering and catching NotImplementedError
try:
    raise NotImplementedError("not implemented yet")
except NotImplementedError as e:
    print(f"Caught NotImplementedError: {e}")
    print(f"Type: {type(e).__name__}")

NotImplementedError is raised when raised to indicate an abstract method must be overridden. Always catch specific exceptions rather than bare except clauses.

Try in Playground

Tags

exceptionerror-handlingcore