MCPcopy Create free account
hub / github.com/cdgriffith/Box / KeysOnly

Class KeysOnly

test/test_box.py:247–254  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

245 assert config == updated
246
247 class KeysOnly:
248 data = {"a": 1, "b": {"c": 2}}
249
250 def keys(self):
251 return self.data.keys()
252
253 def __getitem__(self, key):
254 return self.data[key]
255
256 bx = Box(KeysOnly())
257 assert bx == KeysOnly.data

Callers 1

Calls

no outgoing calls

Tested by 1