(self, cnf, kw = None)
return res
Internal function.
Internal function.
Internal function .
def _options(self, cnf, kw = None):
        """Internal function."""
        if kw:
            cnf = _cnfmerge((cnf, kw))
        else:
            cnf = _cnfmerge(cnf)
        res = ()
        for k, v in cnf.items():
            if v is not None:
                if k[-1] == '_': k = k[:-1]
                if callable(v):
                    v = self._register(v)
                elif isinstance(v, (tuple, list)):
                    nv = []
                    for item in v:
                        if isinstance(item, int):
                            nv.append(str(item))
                        elif isinstance(item, str):
                            nv.append(_stringify(item))
                        else:
                            break
                    else:
                        v = ' '.join(nv)
                res = res + ('-'+k, v)
        return res
def _options ( self , cnf , kw = None ) : if kw : cnf = _cnfmerge ( ( cnf , kw ) ) else : cnf = _cnfmerge ( cnf ) res = ( ) for k , v in cnf . items ( ) : if v is not None : if k [ - 1 ] == '_' : k = k [ : - 1 ] if callable ( v ) : v = self . _register ( v ) elif isinstance ( v , ( tuple , list ) ) : nv = [ ] for item in v : if isinstance ( item , int ) : nv . append ( str ( item ) ) elif isinstance ( item , str ) : nv . append ( _stringify ( item ) ) else : break else : v = ' ' . join ( nv ) res = res + ( '-' + k , v ) return res