title: Generator with return statement
body: <p>During my coverage, I scratched my head on the following case (python 3.4)</p>
  
  <pre><code>def simple_gen_function(str_in, sep=""):
      if sep == "":
          yield str_in[0]
          for c in str_in[1:]:
              yield c
      else:
          return str_in
          # yield from str_in
  
  str_in = "je teste "
  t = "".join(simple_gen_function(str_in))
  p = "".join(simple_gen_function(str_in, "\n"))
  
  print("%r %r" % (t, p))
  # 'je teste' ''
  </code></pre>
  
  <p>Using return in the generator, the return was not "reached" while using <code>yield from str_in</code> I have the expected result. </p>
  
  <p>The question seems simple, but I believed that using return in a generator, it was in reached.</p>