qiskit/qasm/node/node.py
def to_string(self, indent):
        """Print with indent."""
        ind = indent * ' '
        if self.root:
            print(ind, self.type, '---', self.root)
        else:
            print(ind, self.type)
        indent = indent + 3
        ind = indent * ' '
        for children in self.children:
            if children is None:
                print("OOPS! type of parent is", type(self))
                print(self.children)
            if isinstance(children, str):
                print(ind, children)
            elif isinstance(children, int):
                print(ind, str(children))
            elif isinstance(children, float):
                print(ind, str(children))
            else:
                children.to_string(indent)
def to_string(self, indent):
        """Print with indent."""
        ind = indent * ' '
        if self.root:
            print(ind, self.type, '---', self.root)
        else:
            print(ind, self.type)
        indent = indent + 3
        ind = indent * ' '
        for children in self.children:
            if children is None:
                print("OOPS! type of parent is", type(self))
                print(self.children)
            if isinstance(children, str):
                print(ind, children)
            elif isinstance(children, int):
                print(ind, str(children))
            elif isinstance(children, float):
                print(ind, str(children))
            else:
                children.to_string(indent)
def to_string ( self , indent ) : ind = indent * ' ' if self . root : print ( ind , self . type , '---' , self . root ) else : print ( ind , self . type ) indent = indent + 3 ind = indent * ' ' for children in self . children : if children is None : print ( "OOPS! type of parent is" , type ( self ) ) print ( self . children ) if isinstance ( children , str ) : print ( ind , children ) elif isinstance ( children , int ) : print ( ind , str ( children ) ) elif isinstance ( children , float ) : print ( ind , str ( children ) ) else : children . to_string ( indent )
Print with indent.
Print with indent .