From 61cf527370737b4d4debce95704433abb07f6f42 Mon Sep 17 00:00:00 2001 From: Aldoo Date: Wed, 22 Feb 2023 10:42:53 +0100 Subject: [PATCH] Removed extra ".__iter__()" in KeyAttrDict iterator: iterating elements in the partition already implicitly calls its __iter__ method. Actually using the dictionary iterator with this extra call would trigger an error since an iterator does not have an iterator. This is no longer the case. --- kmk/keys.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kmk/keys.py b/kmk/keys.py index 8cee305..cf5cd5d 100644 --- a/kmk/keys.py +++ b/kmk/keys.py @@ -435,7 +435,7 @@ class KeyAttrDict: def __iter__(self): for partition in self.__cache: - for name in partition.__iter__(): + for name in partition: yield name def __setitem__(self, name: str, key: Key):