def make_id(string):
 id = string.lower()
 if (not isinstance(id, unicode)):
  id = id.decode()
 id = id.translate(_non_id_translate_digraphs)
 id = id.translate(_non_id_translate)
 id = unicodedata.normalize('NFKD', id).encode('ascii', 'ignore').decode('ascii')
 id = _non_id_chars.sub('-', ' '.join(id.split()))
 id = _non_id_at_ends.sub('', id)
 return str(id)

def make_id ( string ) : id = string . lower ( ) if ( not isinstance ( id , unicode ) ) : id = id . decode ( ) id = id . translate ( _non_id_translate_digraphs ) id = id . translate ( _non_id_translate ) id = unicodedata . normalize ( 'NFKD' , id ) . encode ( 'ascii' , 'ignore' ) . decode ( 'ascii' ) id = _non_id_chars . sub ( '-' , ' ' . join ( id . split ( ) ) ) id = _non_id_at_ends . sub ( '' , id ) return str ( id )
build a string id from a value .