def _gen_candidate_chars(characters):
 chars = []
 for chars_spec in characters:
  chars.append(to_text(getattr(string, to_native(chars_spec), chars_spec), errors='strict'))
 chars = u''.join(chars).replace(u'"', u'').replace(u"'", u'')
 return chars

def _gen_candidate_chars ( characters ) : chars = [ ] for chars_spec in characters : chars . append ( to_text ( getattr ( string , to_native ( chars_spec ) , chars_spec ) , errors = 'strict' ) ) chars = u'' . join ( chars ) . replace ( u'"' , u'' ) . replace ( u"'" , u'' ) return chars
generate a string containing all valid chars as defined by characters :arg characters: a list of character specs .