(self, indent='', depth=0, full=True)
return "".join(out)
Diagnostic method for listing out the contents of
        a :class:`ParseResults`. Accepts an optional ``indent`` argument so
        that this string can be embedded in a nested display of other data.

        Example::

            integer = Word(nums)
            date_str = integer("year") + '/' + integer("month") + '/' + integer("day")

            result = date_str.parseString('12/31/1999')
            print(result.dump())

        prints::

            ['12', '/', '31', '/', '1999']
            - day: 1999
            - month: 31
            - year: 12
Diagnostic method for listing out the contents of
        a :class:`ParseResults`. Accepts an optional ``indent`` argument so
        that this string can be embedded in a nested display of other data.
Diagnostic method for listing out the contents of a : class : ParseResults . Accepts an optional indent argument so that this string can be embedded in a nested display of other data .
def dump(self, indent='', depth=0, full=True):
        """
        Diagnostic method for listing out the contents of
        a :class:`ParseResults`. Accepts an optional ``indent`` argument so
        that this string can be embedded in a nested display of other data.

        Example::

            integer = Word(nums)
            date_str = integer("year") + '/' + integer("month") + '/' + integer("day")

            result = date_str.parseString('12/31/1999')
            print(result.dump())

        prints::

            ['12', '/', '31', '/', '1999']
            - day: 1999
            - month: 31
            - year: 12
        """
        out = []
        NL = '\n'
        out.append( indent+_ustr(self.asList()) )
        if full:
            if self.haskeys():
                items = sorted((str(k), v) for k,v in self.items())
                for k,v in items:
                    if out:
                        out.append(NL)
                    out.append( "%s%s- %s: " % (indent,('  '*depth), k) )
                    if isinstance(v,ParseResults):
                        if v:
                            out.append( v.dump(indent,depth+1) )
                        else:
                            out.append(_ustr(v))
                    else:
                        out.append(repr(v))
            elif any(isinstance(vv,ParseResults) for vv in self):
                v = self
                for i,vv in enumerate(v):
                    if isinstance(vv,ParseResults):
                        out.append("\n%s%s[%d]:\n%s%s%s" % (indent,('  '*(depth)),i,indent,('  '*(depth+1)),vv.dump(indent,depth+1) ))
                    else:
                        out.append("\n%s%s[%d]:\n%s%s%s" % (indent,('  '*(depth)),i,indent,('  '*(depth+1)),_ustr(vv)))

        return "".join(out)
def dump ( self , indent = '' , depth = 0 , full = True ) : out = [ ] NL = '\n' out . append ( indent + _ustr ( self . asList ( ) ) ) if full : if self . haskeys ( ) : items = sorted ( ( str ( k ) , v ) for k , v in self . items ( ) ) for k , v in items : if out : out . append ( NL ) out . append ( "%s%s- %s: " % ( indent , ( '  ' * depth ) , k ) ) if isinstance ( v , ParseResults ) : if v : out . append ( v . dump ( indent , depth + 1 ) ) else : out . append ( _ustr ( v ) ) else : out . append ( repr ( v ) ) elif any ( isinstance ( vv , ParseResults ) for vv in self ) : v = self for i , vv in enumerate ( v ) : if isinstance ( vv , ParseResults ) : out . append ( "\n%s%s[%d]:\n%s%s%s" % ( indent , ( '  ' * ( depth ) ) , i , indent , ( '  ' * ( depth + 1 ) ) , vv . dump ( indent , depth + 1 ) ) ) else : out . append ( "\n%s%s[%d]:\n%s%s%s" % ( indent , ( '  ' * ( depth ) ) , i , indent , ( '  ' * ( depth + 1 ) ) , _ustr ( vv ) ) ) return "" . join ( out )