MCPcopy Index your code
hub / github.com/python/cpython / lowerdict

Class lowerdict

Lib/test/test_collections.py:241–249  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

239
240 # Use a different map than a dict
241 class lowerdict(dict):
242 def __getitem__(self, key):
243 if isinstance(key, str):
244 key = key.lower()
245 return dict.__getitem__(self, key)
246 def __contains__(self, key):
247 if isinstance(key, str):
248 key = key.lower()
249 return dict.__contains__(self, key)
250
251 c = ChainMap()
252 c['a'] = 1

Callers 1

test_new_childMethod · 0.85

Calls

no outgoing calls

Tested by 1

test_new_childMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…