[SOLVED] Python: Recursion and Generators

Status
You're currently viewing only lostnihilist's posts. Click here to go back to viewing the entire thread.
Not open for further replies.

lostnihilist

Ars Scholae Palatinae
1,436
I believe you have run in to the reason for the creation of the "yield from" syntax:
http://www.python.org/dev/peps/pep-0380/

There are code samples there on what you need to do until that syntax is fully developed and supported. But basically, when you are doing recursive/nested yields, you need to loop over the recursed/nested call and yield each item individually.
 
Status
You're currently viewing only lostnihilist's posts. Click here to go back to viewing the entire thread.
Not open for further replies.