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

Method newconfig

Lib/test/test_configparser.py:1970–1974  ·  view source on GitHub ↗
(self, defaults=None)

Source from the content-addressed store, hash-verified

1968 config_class = configparser.ConfigParser
1969
1970 def newconfig(self, defaults=None):
1971 instance = super().newconfig(defaults=defaults)
1972 instance.converters['list'] = lambda v: [e.strip() for e in v.split()
1973 if e.strip()]
1974 return instance
1975
1976 def test_converters(self):
1977 cfg = self.newconfig()

Calls 3

superClass · 0.85
stripMethod · 0.45
splitMethod · 0.45

Tested by

no test coverage detected