On Sat, Jun 15, 2013 at 11:53 PM, Jim Mooney <cybervigila...@gmail.com> wrote:
>
> class NobodyHome: pass
> x = NobodyHome()
> print(not x) # Result is False when I thought this would be True.

Quote:

>> If neither __bool__ nor __len__ is defined, the object defaults to being 
>> truthy:
>>
>>     >>> not not object()
>>     True
>>     >>> not object()
>>     False
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to