def translate_syntax_error(error, source=None):
 error.source = source
 error.translated = True
 exc_info = (type(error), error, None)
 filename = error.filename
 if (filename is None):
  filename = '<unknown>'
 return fake_exc_info(exc_info, filename, error.lineno)

def translate_syntax_error ( error , source = None ) : error . source = source error . translated = True exc_info = ( type ( error ) , error , None ) filename = error . filename if ( filename is None ) : filename = '<unknown>' return fake_exc_info ( exc_info , filename , error . lineno )
rewrites a syntax error to please traceback systems .