parameters: (message, category, filename, lineno, line=None)
return_statement: return s
docstring: Function to format a warning the standard way.
docstring_summary: Function to format a warning the standard way.
docstring_tokens: Function to format a warning the standard way .
function: def formatwarning(message, category, filename, lineno, line=None):
      """Function to format a warning the standard way."""
      s =  "%s:%s: %s: %s\n" % (filename, lineno, category.__name__, message)
      line = linecache.getline(filename, lineno) if line is None else line
      if line:
          line = line.strip()
          s += "  %s\n" % line
      return s
function_tokens: def formatwarning ( message , category , filename , lineno , line = None ) : s = "%s:%s: %s: %s\n" % ( filename , lineno , category . __name__ , message ) line = linecache . getline ( filename , lineno ) if line is None else line if line : line = line . strip ( ) s += "  %s\n" % line return s