MCPcopy Create free account
hub / github.com/bslatkin/effectivepython / __getitem__

Method __getitem__

example_code/item_025.py:120–121  ·  view source on GitHub ↗
(self, key)

Source from the content-addressed store, hash-verified

118 self.data = {}
119
120 def __getitem__(self, key):
121 return self.data[key]
122
123 def __setitem__(self, key, value):
124 self.data[key] = value

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected