

@staticmethod
def _is_default_hook(default_hook, hook):
    'Checks whether a specific hook is in its default state.\n\n    Args:\n      cls: A ndb.model.Model class.\n      default_hook: Callable specified by ndb internally (do not override).\n      hook: The hook defined by a model class using _post_*_hook.\n\n    Raises:\n      TypeError if either the default hook or the tested hook are not callable.\n    '
    if (not hasattr(default_hook, '__call__')):
        raise TypeError('Default hooks for ndb.model.Model must be callable')
    if (not hasattr(default_hook, '__call__')):
        raise TypeError('Hooks must be callable')
    return (default_hook.im_func is hook.im_func)

dataset/ETHPy150Open GoogleCloudPlatform/datastore-ndb-python/ndb/model.py Model._is_default_hook/VarMisuse@42/206 `hook`->`default_hook`