title: Generic NamedTuple in python 3.7
body: <p>What is the correct way to define a <strong>Generic</strong> <strong>NamedTuple</strong>  in using the typing module <strong>python 3.7</strong>?</p>
  
  <p>I can define</p>
  
  <pre class="lang-py prettyprint-override"><code>from typing import TypeVar, Generic, NamedTuple
  
  T = TypeVar("T")
  
  class C(Generic[T], NamedTuple):
      """NameTuple and Generic ???"""
      x: T
  
  c = C(1)
  print(c)  # prints "C(x=1)", as expected
  
  </code></pre>
  
  <p>However, I cannot use the <code>C[T]</code> as a type hint:</p>
  
  <pre class="lang-py prettyprint-override"><code># raises TypeError: 'type' object is not subscriptable
  def f(c: C[int]):
      print("from f:", c)
  </code></pre>