这是indexloc提供的服务,不要输入任何密码
Skip to content

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

3 participants