parameters: (s)
return_statement: return re.sub(r'[\\{}]', lambda mo: xlat[mo.group()], s)
docstring: Replace backslash and braces with their escaped equivalents
docstring_summary: Replace backslash and braces with their escaped equivalents
docstring_tokens: Replace backslash and braces with their escaped equivalents
function: def alltt_escape(s):
      'Replace backslash and braces with their escaped equivalents'
      xlat = {'{': r'\{', '}': r'\}', '\\': r'\textbackslash{}'}
      return re.sub(r'[\\{}]', lambda mo: xlat[mo.group()], s)
function_tokens: def alltt_escape ( s ) : xlat = { '{' : r'\{' , '}' : r'\}' , '\\' : r'\textbackslash{}' } return re . sub ( r'[\\{}]' , lambda mo : xlat [ mo . group ( ) ] , s )