title: How to yield results from a nested generator function?
body: <p>I have a function which yields results as it downloads them. For the purposes of this question, lets say I yield a sting once every second but I want a convenience function to wrap my generator:</p>
  
  <pre><code>import time
  
  def GeneratorFunction(max_val):
      for i in range(0,5):
          time.sleep(1)
          yield "String %d"%i
  
  def SmallGenerator():
      yield GeneratorFunction(3)
  
  for s in SmallGenerator():
      print s
  </code></pre>
  
  <p>...why doesn't that just print the 5 strings I'm expecting? Instead it appears to return the generator functio:</p>
  
  <pre><code>&lt;generator object GeneratorFunction at 0x020649B8&gt;
  </code></pre>
  
  <p>How can I get this to yield the strings as a normal generator function would?</p>