Expression can be simplified on list

Lawrence D’Oliveiro lawrencedo99 at gmail.com
Wed Sep 14 16:59:17 EDT 2016


On Thursday, September 15, 2016 at 8:13:05 AM UTC+12, Terry Reedy wrote:
> Because True is the default, object need not and at least in CPython 
> does not have a __bool__ (or __len__) method.

If they had to (in the absence of which a bool() cast would not work), then that would help prevent problems like the one I previously linked to, don’t you think?



More information about the Python-list mailing list