Skip to content

Files

Latest commit

 

History

History
27 lines (17 loc) · 804 Bytes

notimplemented-raised.md

File metadata and controls

27 lines (17 loc) · 804 Bytes

Pattern: NotImplemented raised instead of NotImplementedError

Issue: -

Description

NotImplemented is is a built-in constant used to indicate that the comparison is not implemented with respect to the other type. NotImplementedError is an exception used to indicate some module functionality is not implemented.

Example of incorrect code:

def bad_case():
    raise NotImplemented  # [notimplemented-raised]

Example of correct code:

def good_case():
    raise NotImplementedError

Further Reading