(self,indent='',depth=0)
return "".join(out)
Diagnostic method for listing out the contents of a 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 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 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):
        """Diagnostic method for listing out the contents of a ParseResults.
           Accepts an optional indent argument so that this string can be embedded
           in a nested display of other data."""
        out = []
        out.append( indent+_ustr(self.asList()) )
        keys = self.items()
        keys.sort()
        for k,v in keys:
            if out:
                out.append('\n')
            out.append( "%s%s- %s: " % (indent,('  '*depth), k) )
            if isinstance(v,ParseResults):
                if v.keys():
                    #~ out.append('\n')
                    out.append( v.dump(indent,depth+1) )
                    #~ out.append('\n')
                else:
                    out.append(_ustr(v))
            else:
                out.append(_ustr(v))
        #~ out.append('\n')
        return "".join(out)
def dump ( self , indent = '' , depth = 0 ) : out = [ ] out . append ( indent + _ustr ( self . asList ( ) ) ) keys = self . items ( ) keys . sort ( ) for k , v in keys : if out : out . append ( '\n' ) out . append ( "%s%s- %s: " % ( indent , ( '  ' * depth ) , k ) ) if isinstance ( v , ParseResults ) : if v . keys ( ) : #~ out.append('\n') out . append ( v . dump ( indent , depth + 1 ) ) #~ out.append('\n') else : out . append ( _ustr ( v ) ) else : out . append ( _ustr ( v ) ) #~ out.append('\n') return "" . join ( out )