Commit 779b89d
committed
Default to 100 max_results
Defaulting to None yields a bad default user experience: if you provide
too open-ended a query (e.g. "testing" or "quantum," examples I use in
the docs) and try dumping into `list(...)` rather than using a
generator, `max_results=None` with the default `page_size` will appear
to hang.
In practice, one should *only* set `max_results=None` in a loop that
processes results incrementally *or* in a long-running process *or* with
a query where the result set is known to be small.
This is arguably a breaking change, but I think it may be appropriate to
bundle it into a minor-version release.1 parent b73723e commit 779b89d
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
440 | 440 | | |
441 | 441 | | |
442 | 442 | | |
443 | | - | |
| 443 | + | |
444 | 444 | | |
445 | 445 | | |
446 | 446 | | |
| |||
0 commit comments