Browse Source

Exceptions

pull/52/head
Jure Šorn 5 years ago
parent
commit
fe4ebe6551
2 changed files with 3 additions and 3 deletions
  1. 2
      README.md
  2. 4
      index.html

2
README.md

@ -1386,7 +1386,7 @@ except <exception> as <name>:
raise
```
### Attributes
### Exception Object
```python
arguments = <name>.args
line_num = <name>.__traceback__.tb_lineno

4
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 = &lt;name&gt;.args
<div><h3 id="exceptionobject">Exception Object</h3><pre><code class="python language-python hljs">arguments = &lt;name&gt;.args
line_num = &lt;name&gt;.__traceback__.tb_lineno
func_name = &lt;name&gt;.__traceback__.tb_frame.f_code.co_name
filename = &lt;name&gt;.__traceback__.tb_frame.f_code.co_filename
@ -1862,7 +1862,7 @@ last_el = op.methodcaller(<span class="hljs-string">'pop'</span>)(&lt;l
<div><h3 id="attributes-2">Attributes</h3><pre><code class="python language-python hljs">&lt;list&gt; = dir(&lt;object&gt;) <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">&lt;list&gt; = dir(&lt;object&gt;) <span class="hljs-comment"># Returns names of object's attributes (incl. methods).</span>
&lt;dict&gt; = vars(&lt;object&gt;) <span class="hljs-comment"># Returns dict of object's fields. Also &lt;object&gt;.__dict__.</span>
</code></pre></div>

|||||||
100:0
Loading…
Cancel
Save