Aug-10-2021, 08:35 PM
I don't think str has a __bool__ method. I looked around for a while and I can't find it anywhere (as expected). I think bool() may have tests for some standard types (int, str, list, set...) built into the function and __bool__ is meant as a way to override the default assessment.