Steven D'Aprano wrote:
I realize this is probably something that would be hard to change for compatibility reasons. Maybe someone can think of a way around that though? It seems to me that not NotImplemented should result in NotImplemented and attempting to convert it to bool should raise a TypeError exception. To my disappointment, you will get your wish, at least for the second
On Wed, Mar 11, 2020 at 09:42:15AM -0000, Steve Jorgensen wrote: part: https://bugs.python.org/issue35712 I am disappointed because, to me, it is a fundamental part of Python's object model that everything can be interpreted as a truthy/falsey object (in the absence of bugs). Anyway, the deprecation warning has been checked in, so it's probably only a matter of time before you will get your TypeError :-)
Oouh, I also feel disappointed. Indeed, I feel that NotImplemented is a fiasco and that a TypeError exception should be raised instead. But I suppose it is central to duck typing concept...