Add python-exception/README.md
This commit is contained in:
6
python-exception/README.md
Normal file
6
python-exception/README.md
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
```python
|
||||||
|
import contextlib
|
||||||
|
_try = contextlib.suppress(Exception)
|
||||||
|
with _try: print(1/0)
|
||||||
|
with _try: print(1/1)
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user