PyDocs

Nav

Python Runtime Services

hasattr

builtins

function
  • hasattr(object, name, /)
Return whether the object has an attribute with the given name.

This is done by calling getattr(obj, name) and catching AttributeError.
0 Examples
No examples for builtins/hasattr.
See Also
No see-alsos for builtins/hasattr
0 Notes
No notes for hasattr