3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-23 11:09:22 +01:00

KeyedDefaultdict: super() already bind to self

Signed-off-by: Celelibi <celelibi@gmail.com>
This commit is contained in:
Celelibi 2020-06-19 01:29:27 +02:00 committed by James Lu
parent 84b73bb89f
commit 6bf66f9e4d

View File

@ -32,7 +32,7 @@ class KeyedDefaultdict(collections.defaultdict):
def __missing__(self, key):
if self.default_factory is None:
# If there is no default factory, just let defaultdict handle it
super().__missing__(self, key)
super().__missing__(key)
else:
value = self[key] = self.default_factory(key)
return value