def replace_methodname(format_string, methodname):
 methodnamehyphen = methodname.replace('_', '-')
 ret = format_string
 ret = ret.replace('{methodname}', methodname)
 ret = ret.replace('{methodnamehyphen}', methodnamehyphen)
 return ret

def replace_methodname ( format_string , methodname ) : methodnamehyphen = methodname . replace ( '_' , '-' ) ret = format_string ret = ret . replace ( '{methodname}' , methodname ) ret = ret . replace ( '{methodnamehyphen}' , methodnamehyphen ) return ret
partially format a format_string .