(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.
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.
        """
        if section == self.default_section:
            raise ValueError('Invalid section name: %r' % section)

        if section in self._sections:
            raise DuplicateSectionError(section)
        self._sections[section] = self._dict()
        self._proxies[section] = SectionProxy(self, section)
def add_section ( self , section ) : if section == self . default_section : raise ValueError ( 'Invalid section name: %r' % section ) if section in self . _sections : raise DuplicateSectionError ( section ) self . _sections [ section ] = self . _dict ( ) self . _proxies [ section ] = SectionProxy ( self , section )