diff --git a/README.md b/README.md index 4175d07..4df26f3 100644 --- a/README.md +++ b/README.md @@ -2150,7 +2150,7 @@ Introspection ```python = hasattr(, '') # Checks if getattr() raises an error. value = getattr(, '') # Raises AttributeError if attribute is missing. -setattr(, '', value) # Only works on user-defined classes. +setattr(, '', value) # Only works on classes with __dict__ attribute. delattr(, '') # Equivalent to `del .`. ``` diff --git a/index.html b/index.html index 8210fa2..c229165 100644 --- a/index.html +++ b/index.html @@ -1882,7 +1882,7 @@ last_el = op.methodcaller('pop')(<l
<bool> = hasattr(<object>, '<attr_name>')  # Checks if getattr() raises an error.
 value  = getattr(<object>, '<attr_name>')  # Raises AttributeError if attribute is missing.
-setattr(<object>, '<attr_name>', value)    # Only works on user-defined classes.
+setattr(<object>, '<attr_name>', value)    # Only works on classes with __dict__ attribute.
 delattr(<object>, '<attr_name>')           # Equivalent to `del <object>.<attr_name>`.
 

Parameters

from inspect import signature