What is the return type hint of a generator function? : <p>I'm trying to write a <code>:rtype:</code> type hint for a generator function. What is the type it returns? </p>

<p>For example, say I have this functions which yields strings:</p>

<pre><code>def read_text_file(fn):
    """
    Yields the lines of the text file one by one.
    :param fn: Path of text file to read.
    :type fn: str
    :rtype: ???????????????? &lt;======================= what goes here?
    """
    with open(fn, 'rt') as text_file:
        for line in text_file:
            yield line
</code></pre>

<p>The return type isn't just a string, it's some kind of iterable of strings? So I can't just write <code>:rtype: str</code>. What's the right hint?</p>
