Forgetting "()" when calling methods
Erik Max Francis
max at alcyone.com
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
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 alcyone.com / http://www.alcyone.com/max/
__ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/ \ The tremor of awe is the best in man.
Erik Max Francis' bookmarks / http://www.alcyone.com/max/links/
A highly categorized list of Web links.
More information about the Python-list