docs: def pretty(self, indent=0, debug=False):
          """
          Return a pretty formatted representation of self.
          """
          debug_details = ''
          if debug:
              debug_details += '<isliteral=%r, iscanonical=%r>' % (self.isliteral, self.iscanonical)
  
          obj = "'%s'" % self.obj if isinstance(self.obj, basestring) else repr(self.obj)
          return (' ' * indent) + ('%s(%s%s)' % (self.__class__.__name__, debug_details, obj))