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

Method delete_section

Lib/idlelib/config.py:859–868  ·  view source on GitHub ↗

Delete a section from self, userCfg, and file. Used to delete custom themes and keysets.

(self, config_type, section)

Source from the content-addressed store, hash-verified

857 return changed
858
859 def delete_section(self, config_type, section):
860 """Delete a section from self, userCfg, and file.
861
862 Used to delete custom themes and keysets.
863 """
864 if section in self[config_type]:
865 del self[config_type][section]
866 configpage = idleConf.userCfg[config_type]
867 configpage.remove_section(section)
868 configpage.Save()
869
870 def clear(self):
871 """Clear all 4 pages.

Callers 3

delete_customMethod · 0.80
delete_custom_keysMethod · 0.80
test_delete_sectionMethod · 0.80

Calls 2

remove_sectionMethod · 0.80
SaveMethod · 0.80

Tested by 1

test_delete_sectionMethod · 0.64