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

Method RemoveEmptySections

Lib/idlelib/config.py:115–119  ·  view source on GitHub ↗

Remove any sections that have no options.

(self)

Source from the content-addressed store, hash-verified

113 self.add_section(section)
114
115 def RemoveEmptySections(self):
116 "Remove any sections that have no options."
117 for section in self.sections():
118 if not self.GetOptionList(section):
119 self.remove_section(section)
120
121 def IsEmpty(self):
122 "Return True if no sections after removing empty sections."

Callers 2

IsEmptyMethod · 0.95

Calls 3

GetOptionListMethod · 0.80
remove_sectionMethod · 0.80
sectionsMethod · 0.45

Tested by 1