Forgetting "()" when calling methods

Erik Max Francis max at
Sun Apr 27 10:22:03 CEST 2003

Alex Martelli wrote:

> I think "if f is None:" and even more "if callable(f):" are
> better ways to express this test -- explicit is better than
> implicit.

I agree wholeheartedly.  I was just giving an real-world example of use
where the "Booleanness" of a function-or-maybe-not-a-function would be

I personally explicitly do "x is None" tests for anything when I'm
checking for Noneness, this was just as an example.

 Erik Max Francis / max at /
 __ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/  \ The tremor of awe is the best in man.
\__/ Goethe
    Erik Max Francis' bookmarks /
 A highly categorized list of Web links.

More information about the Python-list mailing list