Skip to content
This repository was archived by the owner on Apr 10, 2022. It is now read-only.

Commit 3ebd257

Browse files
committed
A few nit fixes
1 parent 3dc8dc9 commit 3ebd257

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

except_star.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ try:
8282
...
8383
except ValueError:
8484
pass
85-
except *CancelledError:
86-
pass
85+
except *CancelledError: # <- SyntaxError:
86+
pass # combining `except` and `except*` is prohibited
8787
```
8888

8989
Exceptions are matched using a subclass check. For example:
@@ -96,7 +96,7 @@ except *OSerror as errors:
9696
print(type(e).__name__)
9797
```
9898

99-
could output:
99+
would output:
100100

101101
```
102102
BlockingIOError
@@ -393,8 +393,8 @@ except *TypeError as e:
393393
# )
394394
```
395395

396-
With the regular exceptions, there's a subtle difference between bare `raise`
397-
and a more specific `raise e`:
396+
With the regular exceptions, there's a subtle difference between `raise e`
397+
and a bare `raise`:
398398

399399
```python
400400
def foo(): | def foo():

0 commit comments

Comments
 (0)