[issue35712] Make NotImplemented unusable in boolean context
Raymond Hettinger
report at bugs.python.org
Mon Nov 9 11:51:55 EST 2020
Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:
One of the idioms for removing None no longer works:
>>> L = [0, 23, 234, 89, None, 0, 35, 9]
>>> list(filter(None.__ne__, L))
Warning (from warnings module):
File "<pyshell#1>", line 1
DeprecationWarning: NotImplemented should not be used in a boolean context
[0, 23, 234, 89, 0, 35, 9]
----------
nosy: +rhettinger
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35712>
_______________________________________
More information about the Python-bugs-list
mailing list