(self, domain)
return (_encode(domain.attributes),
                _encode(domain.class_vars),
                _encode(domain.metas))
Encode domain into tuples (name, type)
        A tuple is returned for each of attributes, class_vars and metas.
Encode domain into tuples (name, type)
        A tuple is returned for each of attributes, class_vars and metas.
Encode domain into tuples ( name type ) A tuple is returned for each of attributes class_vars and metas .
def encode_domain(self, domain):
        """Encode domain into tuples (name, type)
        A tuple is returned for each of attributes, class_vars and metas.
        """

        if self.match_values == self.MATCH_VALUES_ALL:
            def _encode(attrs):
                return tuple((v.name, list(v.values) if v.is_discrete else vartype(v))
                             for v in attrs)
        else:
            def _encode(attrs):
                return tuple((v.name, vartype(v)) for v in attrs)
        return (_encode(domain.attributes),
                _encode(domain.class_vars),
                _encode(domain.metas))
def encode_domain ( self , domain ) : if self . match_values == self . MATCH_VALUES_ALL : def _encode ( attrs ) : return tuple ( ( v . name , list ( v . values ) if v . is_discrete else vartype ( v ) ) for v in attrs ) else : def _encode ( attrs ) : return tuple ( ( v . name , vartype ( v ) ) for v in attrs ) return ( _encode ( domain . attributes ) , _encode ( domain . class_vars ) , _encode ( domain . metas ) )