`getattr` works well here, since we both want to check if `__self__` exists (which means that `func` is a method), and that it's not `None`, which would be the case for an unbound method on PY2.