def __init__(self, s=None, unchecked=False):
        """return an `CMAOptions` instance, either with the default
        options, if ``s is None``, or with all options whose name or
        description contains `s`, if `s` is a string (case is
        disregarded), or with entries from dictionary `s` as options,
        not complemented with default options or settings

        Returns: see above.

        """
        # if not CMAOptions.defaults:  # this is different from self.defaults!!!
        #     CMAOptions.defaults = fmin([],[])
        if s is None:
            super(CMAOptions, self).__init__(CMAOptions.defaults())  # dict.__init__(self, CMAOptions.defaults()) should be the same
            # self = CMAOptions.defaults()
        elif isinstance(s, basestring):
            super(CMAOptions, self).__init__(CMAOptions().match(s))
            # we could return here
        else:
            super(CMAOptions, self).__init__(s)

        if not unchecked and s is not None:
            self.check()  # caveat: infinite recursion
            for key in list(self.keys()):
                correct_key = self.corrected_key(key)
                if correct_key not in CMAOptions.defaults():
                    _print_warning('invalid key ``' + str(key) +
                                   '`` removed', '__init__', 'CMAOptions')
                    self.pop(key)
                elif key != correct_key:
                    self[correct_key] = self.pop(key)
        # self.evaluated = False  # would become an option entry
        self._lock_setting = False
        self._attributes = self.__dict__.copy()  # are not valid keys
        self._attributes['_attributes'] = len(self._attributes)
def __init__ ( self , s = None , unchecked = False ) : if s is None : super ( CMAOptions , self ) . __init__ ( CMAOptions . defaults ( ) ) elif isinstance ( s , basestring ) : super ( CMAOptions , self ) . __init__ ( CMAOptions ( ) . match ( s ) ) else : super ( CMAOptions , self ) . __init__ ( s ) if not unchecked and s is not None : self . check ( ) for key in list ( self . keys ( ) ) : correct_key = self . corrected_key ( key ) if correct_key not in CMAOptions . defaults ( ) : _print_warning ( 'invalid key ``' + str ( key ) + '`` removed' , '__init__' , 'CMAOptions' ) self . pop ( key ) elif key != correct_key : self [ correct_key ] = self . pop ( key ) self . _lock_setting = False self . _attributes = self . __dict__ . copy ( ) self . _attributes [ '_attributes' ] = len ( self . _attributes )
return an `CMAOptions` instance, either with the default
        options, if ``s is None``, or with all options whose name or
        description contains `s`, if `s` is a string (case is
        disregarded), or with entries from dictionary `s` as options,
        not complemented with default options or settings

        Returns: see above.