From 226bf1b6ada0c217408590abf69379d5f44a7972 Mon Sep 17 00:00:00 2001 From: timofey Date: Tue, 28 Mar 2023 03:03:54 +0000 Subject: [PATCH] proper `KeyError` handling in `of` --- v6d2ctx/at_of.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v6d2ctx/at_of.py b/v6d2ctx/at_of.py index c39c244..e01ac74 100644 --- a/v6d2ctx/at_of.py +++ b/v6d2ctx/at_of.py @@ -22,7 +22,7 @@ class AtOf(Generic[K, V]): def of(key: K) -> V: try: return bucket[key] - except IndexError: + except (IndexError, KeyError): raise Implicit return at, of