def replacement_fields(s):
 repl_fields_re = re.compile('\\{[^\\}]*\\}')
 return sorted(repl_fields_re.findall(s))

def replacement_fields ( s ) : repl_fields_re = re . compile ( '\\{[^\\}]*\\}' ) return sorted ( repl_fields_re . findall ( s ) )
return a sorted list of the python replacement fields in the string s .