Comment

Anonymous

probably the best way (if you can afford to wait until the last possible moment) is to try making the call and catch the TypeError exception

Replies

Peter Bengtsson

I prefer not to use try and except statements. They look too wild and don't give any performance improvement.

Anonymous

Except for callables which might trigger nuclear weapons.