[Python-3000] Add "generalized boolean" as ABC to PEP 3119
greg.ewing at canterbury.ac.nz
Wed Oct 17 00:06:01 CEST 2007
David A. Wheeler wrote:
> Any class defining __bool__ (formerly __nonzero__), or one implementing
> Sized (which implement __len__), would be a generalized boolean.
Considering that *all* objects have at least an implicit
implementation of __bool__ (that tests against None) I'm
not sure that this would be a meaningful or useful
What use cases do you have in mind for this?
More information about the Python-3000