Skip to content
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

add imap_enumerated #160

Merged
merged 2 commits into from
Jun 7, 2023
Merged

add imap_enumerated #160

merged 2 commits into from
Jun 7, 2023

Conversation

spyoungtech
Copy link
Owner

@spyoungtech spyoungtech commented Dec 29, 2022

Adds the imap_enumerated function.

Like imap, but yields tuple of original request index (as it was provided in the requests parameter sequence) and response object.

Unlike imap, failed results and responses from exception handlers that return None are not ignored. Instead, a tuple of (index, None) is yielded. Additionally, the requests parameter must be a sequence of Request objects (generators will be exhausted, but this may cause issues if the generator is infinite or otherwise very large).

The index is merely the original index of the original request in the requests list and does NOT provide any indication of the order in which requests or responses are sent or received. Responses are still yielded in arbitrary order.

Resolves #159

@spyoungtech spyoungtech mentioned this pull request Dec 29, 2022
@latot
Copy link

latot commented Jun 7, 2023

Hi!, when can be merged?

@spyoungtech spyoungtech merged commit f4ed970 into master Jun 7, 2023
@spyoungtech
Copy link
Owner Author

@latot merged. I will try to get this change published to PyPI shortly.

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.

Add index in imap
2 participants