[Python-Dev] the not operator (and the not special method) (original) (raw)
Aahz aahz@pythoncraft.com
Thu, 3 Oct 2002 19:22:15 -0400
- Previous message: [Python-Dev] the not operator (and the __not__ special method)
- Next message: [Python-Dev] the not operator (and the __not__ special method)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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/
- Previous message: [Python-Dev] the not operator (and the __not__ special method)
- Next message: [Python-Dev] the not operator (and the __not__ special method)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]