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

Method __setitem__

Lib/configparser.py:1022–1033  ·  view source on GitHub ↗
(self, key, value)

Source from the content-addressed store, hash-verified

1020 return self._proxies[key]
1021
1022 def __setitem__(self, key, value):
1023 # To conform with the mapping protocol, overwrites existing values in
1024 # the section.
1025 if key in self and self[key] is value:
1026 return
1027 # XXX this is not atomic if read_dict fails at any point. Then again,
1028 # no update method in configparser is atomic in this implementation.
1029 if key == self.default_section:
1030 self._defaults.clear()
1031 elif key in self._sections:
1032 self._sections[key].clear()
1033 self.read_dict({key: value})
1034
1035 def __delitem__(self, key):
1036 if key == self.default_section:

Callers

nothing calls this directly

Calls 2

read_dictMethod · 0.95
clearMethod · 0.45

Tested by

no test coverage detected