From fe4ebe65515cb369169f84e4368f308113887256 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= <sornjure@gmail.com> Date: Thu, 13 Feb 2020 12:55:02 +0100 Subject: [PATCH] Exceptions --- README.md | 2 +- index.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d87a779..cbcccd9 100644 --- a/README.md +++ b/README.md @@ -1386,7 +1386,7 @@ except <exception> as <name>: raise ``` -### Attributes +### Exception Object ```python arguments = <name>.args line_num = <name>.__traceback__.tb_lineno diff --git a/index.html b/index.html index cb1682b..e5fb3c3 100644 --- a/index.html +++ b/index.html @@ -1302,7 +1302,7 @@ LogicOp = Enum(<span class="hljs-string">'LogicOp'</span>, {<span class="hljs-st <span class="hljs-keyword">raise</span> </code></pre></div> -<div><h3 id="attributes-1">Attributes</h3><pre><code class="python language-python hljs">arguments = <name>.args +<div><h3 id="exceptionobject">Exception Object</h3><pre><code class="python language-python hljs">arguments = <name>.args line_num = <name>.__traceback__.tb_lineno func_name = <name>.__traceback__.tb_frame.f_code.co_name filename = <name>.__traceback__.tb_frame.f_code.co_filename @@ -1862,7 +1862,7 @@ last_el = op.methodcaller(<span class="hljs-string">'pop'</span>)(<l -<div><h3 id="attributes-2">Attributes</h3><pre><code class="python language-python hljs"><list> = dir(<object>) <span class="hljs-comment"># Returns names of object's attributes (incl. methods).</span> +<div><h3 id="attributes-1">Attributes</h3><pre><code class="python language-python hljs"><list> = dir(<object>) <span class="hljs-comment"># Returns names of object's attributes (incl. methods).</span> <dict> = vars(<object>) <span class="hljs-comment"># Returns dict of object's fields. Also <object>.__dict__.</span> </code></pre></div>