def callable(obj):
        return any(klass.__dict__ in "__call__" for klass in type(obj).__mro__)


# --- stdlib additions


# py 3.2 functools.lru_cache
# Taken from: http://code.activestate.com/recipes/578078
# Credit: Raymond Hettinger
dataset/ETHPy150Open giampaolo/psutil/psutil/_compat.py/callable/swapped operands of `in`