Hasattr.md (300B)
1 # hasattr() 2 3 **Source:** [hasattr()](https://docs.python.org/3.9/library/functions.html?highlight=hasattr#hasattr) 4 5 hasattr() is a built-in method to check if an object has a specified attribute. Given that Python doesn't enforce the definition of atributes for objects, this is sometimes necessary.