MCPcopy Index your code
hub / github.com/RustPython/RustPython / lowerdict

Class lowerdict

Lib/test/test_collections.py:240–248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

test_new_childMethod · 0.85

Calls

no outgoing calls

Tested by 1

test_new_childMethod · 0.68