Skip to content

Fix and clarify exception handling in generators#105

Merged
danvratil merged 1 commit intomainfrom
generator-exceptions
Aug 6, 2022
Merged

Fix and clarify exception handling in generators#105
danvratil merged 1 commit intomainfrom
generator-exceptions

Conversation

@danvratil
Copy link
Collaborator

Both sync and async generators now behave the same way. If the
generator coroutine throws an exception, it is rethrown either
from generator's begin() method, or when incrementing the
generator iterator.

Afterwards both the iterator and the generator are considered
invalid and may not be used anymore.

Both sync and async generators now behave the same way. If the
generator coroutine throws an exception, it is rethrown either
from generator's begin() method, or when incrementing the
generator iterator.

Afterwards both the iterator and the generator are considered
invalid and may not be used anymore.
@danvratil danvratil force-pushed the generator-exceptions branch from c965f5f to 4dc3bd7 Compare August 6, 2022 13:50
@danvratil danvratil merged commit 8babb1c into main Aug 6, 2022
@danvratil danvratil deleted the generator-exceptions branch August 7, 2022 10:45
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.

1 participant