MCPcopy Create free account
hub / github.com/mongodb/mongo-python-driver / __anext__

Method __anext__

test/asynchronous/unified_format.py:206–211  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

204 return self.first_result is not None or self.find_cursor.alive
205
206 async def __anext__(self):
207 if self.first_result is not None:
208 first = self.first_result
209 self.first_result = None
210 return first
211 return await anext(self.find_cursor)
212
213 # Added to support the iterateOnce operation.
214 try_next = __anext__

Callers 2

test_gridfs_findMethod · 0.45
test_iteratorMethod · 0.45

Calls 1

anextFunction · 0.90

Tested by 2

test_gridfs_findMethod · 0.36
test_iteratorMethod · 0.36