Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Implement return value from yield() #1397
To create generator functions, we need yield(value) to be implemented. This would act like yield(), but 'value' would be passed back and returned from the resume() call.
This would allow range() to be made into an iterator, rather than creating a potentially huge array.
This would also be a step towards nice features like list/dict comprehension.