parameters: (error, source=None)
return_statement: return fake_exc_info(exc_info, filename, error.lineno)
docstring: Rewrites a syntax error to please traceback systems.
docstring_summary: Rewrites a syntax error to please traceback systems.
docstring_tokens: Rewrites a syntax error to please traceback systems .
function: def translate_syntax_error(error, source=None):
      """Rewrites a syntax error to please traceback systems."""
      error.source = source
      error.translated = True
      exc_info = (error.__class__, error, None)
      filename = error.filename
      if filename is None:
          filename = '<unknown>'
      return fake_exc_info(exc_info, filename, error.lineno)
function_tokens: def translate_syntax_error ( error , source = None ) : error . source = source error . translated = True exc_info = ( error . __class__ , error , None ) filename = error . filename if filename is None : filename = '<unknown>' return fake_exc_info ( exc_info , filename , error . lineno )