Why does this python code have a syntax error?
<p>To practice python, I made a simple class for a tree structure in which each node can have infinite child nodes.</p>

<pre><code>class Tree():

  def __init__(self, children, val):
    self.children = children
    self.val = val

  def add(self, child):
    self.children.append(child)

  def remove(self, index):
    child = self.children[index]
    self.children.remove(child)
    return child

  def print(self):
    self.__print__(0)

  def __print__(self, indentation):
    valstr = ''
    for i in range(0, indentation):
      valstr += ' '
    valstr += self.val
    for child in self.children:
      child.__print__(indentation + 1)
</code></pre>

<p>However, I have a syntax error in the line <code>def print(self):</code>. Where is the error? I have been looking for a long time, and it seems like the right way to define a python function.</p>

<p>I have also tried</p>

<pre><code>  @override
  def print(self):
    self.__print__(0)
</code></pre>

<p>to no avail.</p>
