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

Class ConvertingDict

Lib/logging/config.py:337–350  ·  view source on GitHub ↗

A converting dictionary wrapper.

Source from the content-addressed store, hash-verified

335# configurator to use for conversion.
336
337class ConvertingDict(dict, ConvertingMixin):
338 """A converting dictionary wrapper."""
339
340 def __getitem__(self, key):
341 value = dict.__getitem__(self, key)
342 return self.convert_with_key(key, value)
343
344 def get(self, key, default=None):
345 value = dict.get(self, key, default)
346 return self.convert_with_key(key, value)
347
348 def pop(self, key, default=None):
349 value = dict.pop(self, key, default)
350 return self.convert_with_key(key, value, replace=False)
351
352class ConvertingList(list, ConvertingMixin):
353 """A converting list wrapper."""

Callers 2

__init__Method · 0.85
convertMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…