[Python-3000] Type annotations: annotating generators

Edward Loper edloper at gradient.cis.upenn.edu
Thu May 18 18:18:32 CEST 2006


Collin Winter wrote:
> So, reasoning by analogy would point to something like
> Generator(is_sent=int, yields=int). 

You'd probably want this to be Iterator(...) instead of Generator(...), 
since the *return value* is an iterator.  (It's the function itself 
that's a generator function, not its return value.)

-Edward



More information about the Python-3000 mailing list