diff --git a/README.md b/README.md index 28f50eb..804ed19 100644 --- a/README.md +++ b/README.md @@ -2235,7 +2235,7 @@ Introspection ``` ```python -<list> = dir(<obj>) # Returns names of all object's attributes (incl. methods). +<list> = dir(<obj>) # Returns names of object's attributes (including methods). <dict> = vars(<obj>) # Returns dict of writable attributes. Also <obj>.__dict__. <bool> = hasattr(<obj>, '<name>') # Checks if object possesses attribute with passed name. value = getattr(<obj>, '<name>') # Returns object's attribute or raises AttributeError. diff --git a/index.html b/index.html index e332aa2..c2f9bfa 100644 --- a/index.html +++ b/index.html @@ -1831,7 +1831,7 @@ CRITICAL:my_module:Running out of disk space. <dict> = globals() <span class="hljs-comment"># Dict of global names and their objects, e.g. __builtin__.</span> </code></pre></div> -<pre><code class="python language-python hljs"><list> = dir(<obj>) <span class="hljs-comment"># Returns names of all object's attributes (incl. methods).</span> +<pre><code class="python language-python hljs"><list> = dir(<obj>) <span class="hljs-comment"># Returns names of object's attributes (including methods).</span> <dict> = vars(<obj>) <span class="hljs-comment"># Returns dict of writable attributes. Also <obj>.__dict__.</span> <bool> = hasattr(<obj>, <span class="hljs-string">'<name>'</span>) <span class="hljs-comment"># Checks if object possesses attribute with passed name.</span> value = getattr(<obj>, <span class="hljs-string">'<name>'</span>) <span class="hljs-comment"># Returns object's attribute or raises AttributeError.</span>