title: Variable number of types of Generic
body: <p>I'm struggling with a case where I would like to specify that a class inheriting from <code>typing.Generic</code> can have various number of types. See a following simple example:</p>
  <pre><code>from typing import *
  
  T = TypeVar('T')
  
  class C(Generic[T]):
      data: Tuple[int, T]
  
  c = C[str]()
  c.data = 4, '4'
  </code></pre>
  <p>This case works fine, but allows <code>data</code> to be only pairs (tuples of two). I would like to write <code>C</code> in such a way that would support tuples of any length and any type, where the first element is <code>int</code> -- provided that the types are specified. In particular I want a structure that would allow for following manipulation (not necessarily in this syntax):</p>
  <pre><code>c1 = C[str]()
  c1.data = 1, '1'   # should work
  c1.data = 1, '1', '1'  # should report an error
  
  c2 = C[str, float]()
  c2.data = 1, '1', 1.0  # should work
  c2.data = 1, '1'  # should report an error
  c2.data = 1, '1', '1'  # should report an error
  </code></pre>
  <p>Is there any way to get described behavior from python / mypy?</p>