⬅︎ Back to callable Python objects
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
I prefer not to use try and except statements. They look too wild and don't give any performance improvement.
Except for callables which might trigger nuclear weapons.
Comment
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
I prefer not to use try and except statements. They look too wild and don't give any performance improvement.
Except for callables which might trigger nuclear weapons.