Commit b3c68fa
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 8ef0759 commit b3c68fa
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
438 | 438 | | |
439 | 439 | | |
440 | 440 | | |
441 | | - | |
| 441 | + | |
442 | 442 | | |
443 | 443 | | |
444 | 444 | | |
| |||
0 commit comments