mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-13 06:19:23 +01:00
KeyedDefaultdict: super() already bind to self
Signed-off-by: Celelibi <celelibi@gmail.com>
This commit is contained in:
parent
84b73bb89f
commit
6bf66f9e4d
@ -32,7 +32,7 @@ class KeyedDefaultdict(collections.defaultdict):
|
|||||||
def __missing__(self, key):
|
def __missing__(self, key):
|
||||||
if self.default_factory is None:
|
if self.default_factory is None:
|
||||||
# If there is no default factory, just let defaultdict handle it
|
# If there is no default factory, just let defaultdict handle it
|
||||||
super().__missing__(self, key)
|
super().__missing__(key)
|
||||||
else:
|
else:
|
||||||
value = self[key] = self.default_factory(key)
|
value = self[key] = self.default_factory(key)
|
||||||
return value
|
return value
|
||||||
|
Loading…
Reference in New Issue
Block a user