Return a human-readable string representation of this object.

        Kwargs:
            indent (int): The amount of spaces to use as indentation.
777931
def pretty_str(self, indent=0):
        
        indent = ' ' * indent
        values = '{{{}}}'.format(', '.join(map(pretty_str, self.value)))

        if self.parenthesis:
            return '{}({})'.format(indent, values)
        return '{}{}'.format(indent, values)
615297
def indent(self):
        
        cursor = self.editor.textCursor()
        assert isinstance(cursor, QtGui.QTextCursor)
        if cursor.hasSelection():
            self.indent_selection(cursor)
        else:
            # simply insert indentation at the cursor position
            tab_len = self.editor.tab_length
            cursor.beginEditBlock()
            if self.editor.use_spaces_instead_of_tabs:
                nb_space_to_add = tab_len - cursor.positionInBlock() % tab_len
                cursor.insertText(nb_space_to_add * " ")
            else:
                cursor.insertText('\t')
            cursor.endEditBlock()
556197
def _get_indentation(line):
    """"""
    if line.strip():
        non_whitespace_index = len(line) - len(line.lstrip())
        return line[:non_whitespace_index]
    else:
        return ''
19316
def pretty_str(self, indent=0):
        
        spaces = ' ' * indent
        return spaces + ', '.join(v.pretty_str() for v in self.variables)
623552
def indent(self, space=4):
        '''
        '''
        if not isinstance(space,int):
            raise TypeError("space must be an int")
        if space < 0:
            raise ValueError("space must be a non-negative integer")
        space = ' '*space; o = []; l = 0
        for c in self.newick():
            if c == '(':
                o.append('(\n'); l += 1; o.append(space*l)
            elif c == ')':
                o.append('\n'); l -= 1; o.append(space*l); o.append(')')
            elif c == ',':
                o.append(',\n'); o.append(space*l)
            else:
                o.append(c)
        return ''.join(o)
1339491
def pretty_str(self, indent=0):
        
        spaces = ' ' * indent
        pretty = spaces + 'class ' + self.name
        if self.superclasses:
            superclasses = ', '.join(self.superclasses)
            pretty += '(' + superclasses + ')'
        pretty += ':\n'
        if self.members:
            pretty += '\n\n'.join(
                    c.pretty_str(indent + 2)
                    for c in self.members
            )
        else:
            pretty += spaces + '  [declaration]'
        return pretty
932780
def indent(self, message):
        
        indent = self.indent_char * self.indent_size
        return indent + message
1271079
def pretty_dict_string(d, indent=0):
    
    s = ''
    for key, value in sorted(d.items()):
        s += '    ' * indent + str(key)
        if isinstance(value, dict):
             s += '\n' + pretty_dict_string(value, indent+1)
        else:
             s += '=' + str(value) + '\n'
    return s
114171
def indentsize(line):
    """"""
    expline = string.expandtabs(line)
    return len(expline) - len(string.lstrip(expline))
861636
def ast_to_code(ast, indent=0):
    # type: (Any, int) -> str
    
    code = []

    def append(line):
        # type: (str) -> None
        code.append(("    " * indent) + line)

    if isinstance(ast, Node):
        append("ast.{}(".format(ast.__class__.__name__))
        indent += 1
        for i, k in enumerate(ast._fields, 1):
            v = getattr(ast, k)
            append("{}={},".format(k, ast_to_code(v, indent)))
        if ast.loc:
            append("loc={}".format(ast_to_code(ast.loc, indent)))

        indent -= 1
        append(")")

    elif isinstance(ast, Loc):
        append("loc({}, {})".format(ast.start, ast.end))

    elif isinstance(ast, list):
        if ast:
            append("[")
            indent += 1

            for i, it in enumerate(ast, 1):
                is_last = i == len(ast)
                append(ast_to_code(it, indent) + ("," if not is_last else ""))

            indent -= 1
            append("]")
        else:
            append("[]")

    else:
        append(repr(ast))

    return "\n".join(code).strip()
79116
def give_str_indented(self, tags=False):
        
        args = self._args[:]
        kwargs = self._kwargs
        rv = self._give_str_indented(args, kwargs, tags)
        if not tags:
            rv = self.strip_color_tags(rv)
        return rv
975937
def pretty(self, indent=0, indent_str='  '):
        
        return '{0}{1}({2!r}): {3!r}'.format(
            indent_str * indent,
            self.__class__.__name__,
            self.name,
            self.value
        )
176550
private String getIndentation() {

		final StringBuilder buf = new StringBuilder();
		
		for (int i=0; i<indentLevel; i++) {

			buf.append("\t");
		}

		return buf.toString();
	}
265816
def indent(indent_str=None):
    

    def indentation_rule():
        inst = Indentator(indent_str)
        return {'layout_handlers': {
            Indent: inst.layout_handler_indent,
            Dedent: inst.layout_handler_dedent,
            Newline: inst.layout_handler_newline,
            OptionalNewline: inst.layout_handler_newline_optional,
            OpenBlock: layout_handler_openbrace,
            CloseBlock: layout_handler_closebrace,
            EndStatement: layout_handler_semicolon,
        }}
    return indentation_rule
500315
def xml(self, indent=4, **kwargs):
        
        writer = StringIO()
        self.write(writer, indent=indent, **kwargs)
        return writer.getvalue()
1151970
def pretty_str(self, indent=0):
        
        spaces = ' ' * indent
        pretty = '{}namespace {}:\n'.format(spaces, self.name)
        pretty += '\n\n'.join(c.pretty_str(indent + 2) for c in self.children)
        return pretty
932207
def pretty(d, indent=0):
    
    for key, value in d.items():
        print('  ' * indent + str(key))
        if isinstance(value, dict):
            pretty(value, indent+1)
        else:
            sys.stderr.write('  ' * (indent+1) + str(value) + '\n')