title: Can we use NamedTuple as field in NamedTuple itself?
body: <p>I need to define a custom data structure (say, Exp) which can have fields as same data structure (i.e., Exp) but very confused what to use...</p>
  
  <p>I'm using NamedTuple in Python3 but when defining the field of type same structure, get Errors.</p>
  
  <pre class="lang-py prettyprint-override"><code>from typing import NamedTuple
  
  class Expression(NamedTuple):
      left: Expression
      right: Expression
      operator: str
  
  exp = Expression(None, None, "AS")
  print(exp)
  </code></pre>
  
  <p>this generates error as follows:</p>
  
  <pre class="lang-py prettyprint-override"><code>Traceback (most recent call last):
    File "expression.py", line 3, in &lt;module&gt;
      class Expression(NamedTuple):
    File "expression.py", line 4, in Expression
      left: Expression
  NameError: name 'Expression' is not defined
  </code></pre>