[Tutor] What is the difference between checking false?

Jim Mooney cybervigilante at gmail.com
Sun Jun 16 05:53:25 CEST 2013


On 15 June 2013 20:48, Joel Goldstick <joel.goldstick at gmail.com> wrote:

> One and zero for True and False may seem not quite right today,

I still think they should be taken out and shot ;')

But my simplification plan failed. Equality always fails for different
types, and 'not in front of None or any empty object such as empty
string, empty list, empty tuple, or empty dict, is always True. But it
appears that idea fails for an empty class:

class NobodyHome: pass
x = NobodyHome()
print(not x) # Result is False when I thought this would be True.

-- 
Jim
After indictment the bacon smuggler was put on the no-fry list


More information about the Tutor mailing list