(self, section)
Create a new section in the configuration.

        Raise DuplicateSectionError if a section by the specified name
        already exists.  Raise ValueError if name is DEFAULT or any of
        its case-insensitive variants.
Create a new section in the configuration.
Create a new section in the configuration .
def add_section(self, section):
        """Create a new section in the configuration.

        Raise DuplicateSectionError if a section by the specified name
        already exists.  Raise ValueError if name is DEFAULT or any of
        its case-insensitive variants.
        """
        # The default section is the only one that gets the case-insensitive
        # treatment - so it is special-cased here.
        if section.lower() == "default":
            raise ValueError('Invalid section name: %s' % section)

        if self.has_section(section):
            raise DuplicateSectionError(section)
        else:
            self.data._new_namespace(section)
def add_section ( self , section ) : # The default section is the only one that gets the case-insensitive # treatment - so it is special-cased here. if section . lower ( ) == "default" : raise ValueError ( 'Invalid section name: %s' % section ) if self . has_section ( section ) : raise DuplicateSectionError ( section ) else : self . data . _new_namespace ( section )