If the Python object defines a __bool__ method, then that is invoked.
Otherwise, if the object defines a __len__ method, then TRUE is
returned if the length is nonzero. If neither __len__ nor __bool__
are defined, then the Python object is considered TRUE.