title: Can we use Union inside generics typehinting in python?
body: <p>I am writing a function which parses a Union type object with list of parsers (with concrete types) and return a unioned type. However I found I cannot get Union working correctly with List generic.</p>
  
  <pre><code>from typing import List,Union,TypeVar
  T=TypeVar("T")
  T1=TypeVar("T1")
  
  def union_list(l: List[Union[T,T1]] )-&gt; Union[T,T1]:
      return l[0]
  
  test=[0,"_"]
  result=union_list(test)
  reveal_type(result)
  </code></pre>
  
  <p>I am expecting to get Union[int,str] as a type for result, but got object instead. Is there a way to union listed types without explicitly stating those?</p>