docs: def toRepr (obj):
      """toRepr(obj) -> string
  
      Converts the Python object to a string representation of the kind
      often returned by a class __repr__() method.
      """
      args  = [ ]
      names = [ ]
  
      if hasattr(obj, "__dict__"):
          names += getattr(obj, "__dict__").keys()
      if hasattr(obj, "__slots__"):
          names += getattr(obj, "__slots__")
  
      for name in names:
          value = getattr(obj, name)
          if value is not None:
              if type(value) is str:
                  if len(value) > 32:
                      value = value[0:32] + "..."
                  value = "'" + value + "'"
          args.append("%s=%s" % (name, str(value)))
  
      return "%s(%s)" % (obj.__class__.__name__, ", ".join(args))