A special defaultdict that passes the key to the default_factory.
Definition at line 139 of file plugin.py.
◆ __missing__()
pytest_selfie.plugin._keydefaultdict.__missing__ |
( |
|
self, |
|
|
|
key |
|
) |
| |
Definition at line 142 of file plugin.py.
142 def __missing__(self, key):
143 if self.default_factory is None:
144 raise KeyError(key)
145 else:
146 ret = self[key] = self.default_factory(key)
147 return ret
148
149
The documentation for this class was generated from the following file: