python (3.12.0)
1 import contextlib
2
3
4 # from jaraco.context 4.3
5 class ESC[4;38;5;81msuppress(ESC[4;38;5;149mcontextlibESC[4;38;5;149m.ESC[4;38;5;149msuppress, ESC[4;38;5;149mcontextlibESC[4;38;5;149m.ESC[4;38;5;149mContextDecorator):
6 """
7 A version of contextlib.suppress with decorator support.
8
9 >>> @suppress(KeyError)
10 ... def key_error():
11 ... {}['']
12 >>> key_error()
13 """