parameters: (cp)
return_statement: return formatters
docstring: Create and return formatters
docstring_summary: Create and return formatters
docstring_tokens: Create and return formatters
function: def _create_formatters(cp):
      """Create and return formatters"""
      flist = cp.get("formatters", "keys")
      if not len(flist):
          return {}
      flist = flist.split(",")
      flist = _strip_spaces(flist)
      formatters = {}
      for form in flist:
          sectname = "formatter_%s" % form
          opts = cp.options(sectname)
          if "format" in opts:
              fs = cp.get(sectname, "format", 1)
          else:
              fs = None
          if "datefmt" in opts:
              dfs = cp.get(sectname, "datefmt", 1)
          else:
              dfs = None
          c = logging.Formatter
          if "class" in opts:
              class_name = cp.get(sectname, "class")
              if class_name:
                  c = _resolve(class_name)
          f = c(fs, dfs)
          formatters[form] = f
      return formatters
function_tokens: def _create_formatters ( cp ) : flist = cp . get ( "formatters" , "keys" ) if not len ( flist ) : return { } flist = flist . split ( "," ) flist = _strip_spaces ( flist ) formatters = { } for form in flist : sectname = "formatter_%s" % form opts = cp . options ( sectname ) if "format" in opts : fs = cp . get ( sectname , "format" , 1 ) else : fs = None if "datefmt" in opts : dfs = cp . get ( sectname , "datefmt" , 1 ) else : dfs = None c = logging . Formatter if "class" in opts : class_name = cp . get ( sectname , "class" ) if class_name : c = _resolve ( class_name ) f = c ( fs , dfs ) formatters [ form ] = f return formatters