Proto-PEP: Overloadable Boolean Operators

greg greg at
Mon Sep 6 03:24:44 CEST 2004

Miki Tebeka wrote:
> Why not just __bool__(self) -> True, False?
> IMO this will answer all of your needs and will require less changes.

Have you read any of the rationale in the PEP?
The whole reason for this is that overriding __bool__
is *not* sufficient for the use cases I have
in mind.


More information about the Python-list mailing list