Forgetting "()" when calling methods

Jeremy Fincher tweedgeezer at hotmail.com
Sun Apr 27 07:15:03 CEST 2003


Frantisek Fuka <fuka at fuxoft.cz> wrote in message news:<b8cadp$1fj9$1 at ns.felk.cvut.cz>...
> When I try to call methods, I sometimes forget to include the 
> parentheses. Instead of:
> 
> if object.isGreen():
> 	do something...
> 
> i sometimes write:
> 
> if object.isGreen:
> 	do something...

Perhaps the answer is to remove the __nonzero__ method on
functions/methods.  Logically, what purpose does it serve?

Jeremy




More information about the Python-list mailing list