From 157244f89451ffbfc9786e9b8cbc5062e24331c1 Mon Sep 17 00:00:00 2001 From: jay817 Date: Wed, 21 Aug 2024 08:26:30 -0400 Subject: [PATCH] Add python-exception/README.md --- python-exception/README.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 python-exception/README.md diff --git a/python-exception/README.md b/python-exception/README.md new file mode 100644 index 0000000..c903bf8 --- /dev/null +++ b/python-exception/README.md @@ -0,0 +1,6 @@ +```python +import contextlib +_try = contextlib.suppress(Exception) +with _try: print(1/0) +with _try: print(1/1) +``` \ No newline at end of file