title: What Python type annotation to represent generic type class
body: <p>In my Python 3.7.4 code I have the following function. </p>
  
  <pre><code>def is_dict(klass: ???) -&gt; bool:
      return klass.__origin__ == dict
  </code></pre>
  
  <p>I'm struggling to get the type annotation right for the <code>klass</code> parameter. It's not <code>type</code>, for that mypy complains.</p>
  
  <blockquote>
    <p>error: "<code>type</code>" has no attribute "<code>__origin__</code>"</p>
  </blockquote>
  
  <p>I'm at a loss. What is the correct annotation and is there any <strong>good</strong> documentation about it?</p>
  
  <p>Here's an example of how this function is used:</p>
  
  <pre><code>&gt;&gt;&gt; is_dict(typing.Dict[str, int])
  True
  &gt;&gt;&gt; is_dict(typing.List[str])
  False
  </code></pre>