docs: def check_rest(module, names, dots=True):
      """
      Check reStructuredText formatting of docstrings
  
      Returns: [(name, success_flag, output), ...]
      """
  
      try:
          skip_types = (dict, str, unicode, float, int)
      except NameError:
          # python 3
          skip_types = (dict, str, float, int)
  
      results = []
  
      if module.__name__[6:] not in OTHER_MODULE_DOCS:
          results += [(module.__name__,) +
                      validate_rst_syntax(inspect.getdoc(module),
                                          module.__name__, dots=dots)]
  
      for name in names:
          full_name = module.__name__ + '.' + name
          obj = getattr(module, name, None)
  
          if obj is None:
              results.append((full_name, False, "%s has no docstring" % (full_name,)))
              continue
          elif isinstance(obj, skip_types):
              continue
  
          if inspect.ismodule(obj):
              text = inspect.getdoc(obj)
          else:
              try:
                  text = str(get_doc_object(obj))
              except:
                  import traceback
                  results.append((full_name, False,
                                  "Error in docstring format!\n" +
                                  traceback.format_exc()))
                  continue
  
          m = re.search("([\x00-\x09\x0b-\x1f])", text)
          if m:
              msg = ("Docstring contains a non-printable character %r! "
                     "Maybe forgot r\"\"\"?" % (m.group(1),))
              results.append((full_name, False, msg))
              continue
  
          try:
              src_file = short_path(inspect.getsourcefile(obj))
          except TypeError:
              src_file = None
  
          if src_file:
              file_full_name = src_file + ':' + full_name
          else:
              file_full_name = full_name
  
          results.append((full_name,) +
                         validate_rst_syntax(text, file_full_name, dots=dots))
  
      return results