[Python-Dev] the not operator (and the not special method) (original) (raw)

Aahz aahz@pythoncraft.com
Thu, 3 Oct 2002 19:22:15 -0400


On Thu, Oct 03, 2002, Brian Quinlan wrote:

> shows that python doesn't call the not special method > in a 'not' operator statement. Python calls the special nonzero method so check the truth value of an object.

Mark McEahern provided the full answer: Python uses len, too.

Aahz (aahz@pythoncraft.com) <*> http://www.pythoncraft.com/

Project Vote Smart: http://www.vote-smart.org/