Olası Çoğalt: Bu "Yanlış" yazdırmak gerektiğini düşündüm
defining “boolness” of a class in pythonPython'un __bool__ yöntemi nasıl yüklenir?
, neden "Doğru" yazdırıyor?
>>> class Foo(object):
... def __bool__(self):
... return False
...
>>> f = Foo()
>>> if f:
... print "True"
... else:
... print "False"
...
True
>>>
Dup (http://stackoverflow.com/questions/2233786) – outis