MCPcopy
hub / github.com/django/django / __getitem__

Method __getitem__

django/test/utils.py:78–85  ·  view source on GitHub ↗
(self, key)

Source from the content-addressed store, hash-verified

76 """
77
78 def __getitem__(self, key):
79 if isinstance(key, str):
80 for subcontext in self:
81 if key in subcontext:
82 return subcontext[key]
83 raise KeyError(key)
84 else:
85 return super().__getitem__(key)
86
87 def get(self, key, default=None):
88 try:

Callers 1

getMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected