Python 3.14 turns a long-standing DeprecationWarning into a hard TypeError: using NotImplemented in a boolean context is now illegal. This commonly surfaces in hand-written __ne__() methods that call self.__eq__() and negate the result with 'not', or in the filter(None.__ne__, values) idiom for removing None from lists. The root cause is that NotImplemented is a truthy singleton meant to signal 'try something else' to Python's comparison machinery, not to be evaluated as a bool. The fix for __ne__ is simply to delete it — Python 3+ already provides a correct default. The fix for the filter idiom is a list comprehension using 'is not None', which is also ~15x faster.
137 Impressions