python 3: how to check if an object is a function?,"hasattr(fn, '__call__')"