Why return NotImplemented instead of raising NotImplementedError

Python has a singleton called NotImplemented.

Why would someone want to ever return NotImplemented instead of raising the NotImplementedError exception? Won’t it just make it harder to find bugs, such as code that executes invalid methods?

4 Answers
4

Leave a Comment