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

Method __next__

test/unified_format.py:205–210  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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

Callers 2

test_gridfs_findMethod · 0.45
test_iteratorMethod · 0.45

Calls 1

nextFunction · 0.90

Tested by 2

test_gridfs_findMethod · 0.36
test_iteratorMethod · 0.36