Comment

Peter Bengtsson

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

Parent 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