Skip to content

Commit d860858

Browse files
committed
Exceptions
1 parent 4ecd54f commit d860858

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1371,8 +1371,8 @@ finally:
13711371
```python
13721372
except <exception>:
13731373
except <exception> as <name>:
1374-
except (<exception>, ...):
1375-
except (<exception>, ...) as <name>:
1374+
except (<exception>, [...]):
1375+
except (<exception>, [...]) as <name>:
13761376
```
13771377
* **Also catches subclasses of the exception.**
13781378
* **Use `'traceback.print_exc()'` to print the error message to stderr.**

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1304,8 +1304,8 @@
13041304
</ul>
13051305
<div><h3 id="catchingexceptions">Catching Exceptions</h3><pre><code class="python language-python hljs"><span class="hljs-keyword">except</span> &lt;exception&gt;:
13061306
<span class="hljs-keyword">except</span> &lt;exception&gt; <span class="hljs-keyword">as</span> &lt;name&gt;:
1307-
<span class="hljs-keyword">except</span> (&lt;exception&gt;, ...):
1308-
<span class="hljs-keyword">except</span> (&lt;exception&gt;, ...) <span class="hljs-keyword">as</span> &lt;name&gt;:
1307+
<span class="hljs-keyword">except</span> (&lt;exception&gt;, [...]):
1308+
<span class="hljs-keyword">except</span> (&lt;exception&gt;, [...]) <span class="hljs-keyword">as</span> &lt;name&gt;:
13091309
</code></pre></div>
13101310

13111311
<ul>

0 commit comments

Comments
 (0)