title: What's the difference between Mypy iterators and generators?
body: <p>What are the key differences and what and where should each be used? </p>
  
  <p>For example in this example usage of both - and Iterator and Generator seems appropriate to me...but is it True?</p>
  
  <p><em>Iterator</em></p>
  
  <pre class="lang-py prettyprint-override"><code>from typing import Generator, Iterator
  
  def fib(n: int) -&gt; Iterator[int]:
      a :int = 0
      b :int = 1
      while a &lt; n:
          yield a
          a, b = b, a+b
  
  print([x for x in fib(3)])
  </code></pre>
  
  <p><em>Generator</em></p>
  
  <pre class="lang-py prettyprint-override"><code>from typing import Generator 
  
  def fib(n: int) -&gt; Generator[int, None, None]:
      a :int = 0
      b :int = 1
      while a &lt; n:
          yield a
          a, b = b, a+b
  
  print([x for x in fib(3)])
  </code></pre>