Skip to content

objgenerator: Implement return with value and .close() method. #368

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 26, 2014

Conversation

pfalcon
Copy link
Contributor

@pfalcon pfalcon commented Mar 23, 2014

Return with value gets converted to StopIteration(value). Implementation
keeps optimizing against creating of possibly unneeded exception objects,
so there're considerable refactoring to implement these features.

@pfalcon
Copy link
Contributor Author

pfalcon commented Mar 23, 2014

It would seem that .close() is minor method, but devil is in the details...

@pfalcon
Copy link
Contributor Author

pfalcon commented Mar 23, 2014

Ah, and see if we need to make is_exc_match() global - I don't know how often we'd need to match exceptions in C code.

Return with value gets converted to StopIteration(value). Implementation
keeps optimizing against creating of possibly unneeded exception objects,
so there're considerable refactoring to implement these features.
@pfalcon
Copy link
Contributor Author

pfalcon commented Mar 26, 2014

Patch updated - is_exc_match() indeed promoted to global API, as well as other API changes for upcoming yield from implementation.

@dpgeorge dpgeorge merged commit 962b1cd into micropython:master Mar 26, 2014
@pfalcon pfalcon deleted the gen-close-ret-val branch August 9, 2014 05:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants