We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e9b503a + 8968bf5 commit e06ec83Copy full SHA for e06ec83
core/google/cloud/iterator.py
@@ -42,6 +42,14 @@
42
... if not my_item.is_valid:
43
... break
44
45
+At any point, you may check the number of items consumed by referencing the
46
+``num_results`` property of the iterator::
47
+
48
+ >>> my_iterator = Iterator(...)
49
+ >>> for my_item in my_iterator:
50
+ ... if my_iterator.num_results >= 10:
51
+ ... break
52
53
When iterating, not every new item will send a request to the server.
54
To iterate based on each page of items (where a page corresponds to
55
a request)::
0 commit comments