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

Method convert_with_key

Lib/logging/config.py:307–317  ·  view source on GitHub ↗
(self, key, value, replace=True)

Source from the content-addressed store, hash-verified

305 """For ConvertingXXX's, this mixin class provides common functions"""
306
307 def convert_with_key(self, key, value, replace=True):
308 result = self.configurator.convert(value)
309 #If the converted value is different, save for next time
310 if value is not result:
311 if replace:
312 self[key] = result
313 if type(result) in (ConvertingDict, ConvertingList,
314 ConvertingTuple):
315 result.parent = self
316 result.key = key
317 return result
318
319 def convert(self, value):
320 result = self.configurator.convert(value)

Callers 5

__getitem__Method · 0.80
getMethod · 0.80
popMethod · 0.80
__getitem__Method · 0.80
__getitem__Method · 0.80

Calls 1

convertMethod · 0.45

Tested by

no test coverage detected