configparser.ConfigParser.add_section()

add_section(section)

Add a section named section to the instance. If a section by the given name already exists, DuplicateSectionError is raised. If the default section name is passed, ValueError is raised. The name of the section must be a string; if not, TypeError is raised.

Changed in version 3.2: Non-string section names raise TypeError.

doc_python
2016-10-07 17:29:11
Comments
Leave a Comment

Please login to continue.