https://docs.python.org/3/reference/datamodel.html#object.bool
object.__bool__(self)
bool
操作時調用.必須返回False
或者True
.如果沒有定義,則調用__len__()
方法
https://docs.python.org/3/reference/datamodel.html#object.bool
object.__bool__(self)
bool
操作時調用.必須返回False
或者True
.如果沒有定義,則調用__len__()
方法