(self, key, default=None, loc=None)
return val
evaluate and return the value of option `key` on the fly, or
        returns those options whose name or description contains `key`,
        case disregarded.

        Details
        -------
        Keys that contain `filename` are not evaluated.
        For ``loc==None``, `self` is used as environment
        but this does not define `N`.

        :See: `eval()`, `evalall()`
evaluate and return the value of option `key` on the fly, or
        returns those options whose name or description contains `key`,
        case disregarded.
evaluate and return the value of option key on the fly or returns those options whose name or description contains key case disregarded .
def __call__(self, key, default=None, loc=None):
        """evaluate and return the value of option `key` on the fly, or
        returns those options whose name or description contains `key`,
        case disregarded.

        Details
        -------
        Keys that contain `filename` are not evaluated.
        For ``loc==None``, `self` is used as environment
        but this does not define `N`.

        :See: `eval()`, `evalall()`

        """
        try:
            val = self[key]
        except:
            return self.match(key)

        if loc is None:
            loc = self  # TODO: this hack is not so useful: popsize could be there, but N is missing
        try:
            if type(val) is str:
                val = val.split('#')[0].strip()  # remove comments
                if type(val) == type('') and key.find('filename') < 0 and key.find('mindx') < 0:
                    val = eval(val, globals(), loc)
            # invoke default
            # TODO: val in ... fails with array type, because it is applied element wise!
            # elif val in (None,(),[],{}) and default is not None:
            elif val is None and default is not None:
                val = eval(str(default), globals(), loc)
        except:
            pass  # slighly optimistic: the previous is bug-free
        return val
def __call__ ( self , key , default = None , loc = None ) : try : val = self [ key ] except : return self . match ( key ) if loc is None : loc = self # TODO: this hack is not so useful: popsize could be there, but N is missing try : if type ( val ) is str : val = val . split ( '#' ) [ 0 ] . strip ( ) # remove comments if type ( val ) == type ( '' ) and key . find ( 'filename' ) < 0 and key . find ( 'mindx' ) < 0 : val = eval ( val , globals ( ) , loc ) # invoke default # TODO: val in ... fails with array type, because it is applied element wise! # elif val in (None,(),[],{}) and default is not None: elif val is None and default is not None : val = eval ( str ( default ) , globals ( ) , loc ) except : pass # slighly optimistic: the previous is bug-free return val