• Avicenna@lemmy.world
    link
    fedilink
    English
    arrow-up
    4
    arrow-down
    1
    ·
    1 year ago

    isn’t the expected behaviour exactly identical on any object that has len defined:

    “By default, an object is considered true unless its class defines either a bool() method that returns False or a len() method that returns zero, when called with the object.”