You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 03_page.ipynb
+9-10Lines changed: 9 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -138,7 +138,7 @@
138
138
"cell_type": "markdown",
139
139
"metadata": {},
140
140
"source": [
141
-
"However, `per_page` has a maximum of `100`, so if you want more, you'll have to pass `page=` to get pages beyond the first. An easy way to iterate through all pages is to use `paged`."
141
+
"However, `per_page` has a maximum of `100`, so if you want more, you'll have to pass `page=` to get pages beyond the first. An easy way to iterate through all pages is to use `paged`. `paged` returns a generator "
142
142
]
143
143
},
144
144
{
@@ -191,7 +191,7 @@
191
191
{
192
192
"data": {
193
193
"text/plain": [
194
-
"(30, 'fast-image')"
194
+
"(30, 'docs')"
195
195
]
196
196
},
197
197
"execution_count": null,
@@ -200,15 +200,15 @@
200
200
}
201
201
],
202
202
"source": [
203
-
"repos = api.repos.list_for_org('fastai')\n",
203
+
"repos = api.repos.list_for_org(org='fastai')\n",
204
204
"len(repos),repos[0].name"
205
205
]
206
206
},
207
207
{
208
208
"cell_type": "markdown",
209
209
"metadata": {},
210
210
"source": [
211
-
"To convert this operation into a Python iterator, pass the operation itself, along with any arguments (either keyword or positional) to `paged`:"
211
+
"To convert this operation into a Python iterator, pass the operation itself, along with any arguments (either keyword or positional) to `paged`. Note how the function and arguments are passed separately:"
<p>However, <code>per_page</code> has a maximum of <code>100</code>, so if you want more, you'll have to pass <code>page=</code> to get pages beyond the first. An easy way to iterate through all pages is to use <ahref="/page.html#paged"><code>paged</code></a>.</p>
185
+
<p>However, <code>per_page</code> has a maximum of <code>100</code>, so if you want more, you'll have to pass <code>page=</code> to get pages beyond the first. An easy way to iterate through all pages is to use <ahref="/page.html#paged"><code>paged</code></a>.<ahref="/page.html#paged"><code>paged</code></a> returns a generator</p>
<p>To convert this operation into a Python iterator, pass the operation itself, along with any arguments (either keyword or positional) to <ahref="/page.html#paged"><code>paged</code></a>:</p>
298
+
<p>To convert this operation into a Python iterator, pass the operation itself, along with any arguments (either keyword or positional) to <ahref="/page.html#paged"><code>paged</code></a>. Note how the function and arguments are passed separately:</p>
<p>You can now iterate through <code>repos</code>using Python, e.g:</p>
322
+
<p>Note that the object returned from <ahref="/page.html#paged"><code>paged</code></a> is a generator. You can iterate through this generator <code>repos</code>in the normal way:</p>
0 commit comments