Opened 77 minutes ago
Last modified 26 minutes ago
#37039 new Cleanup/optimization
Outdated QuerySet.iterator() documentation
| Reported by: | Lincoln | Owned by: | |
|---|---|---|---|
| Component: | Documentation | Version: | |
| Severity: | Normal | Keywords: | |
| Cc: | Lincoln, MANAS MADESHIYA | Triage Stage: | Unreviewed |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
The QuerySet.iterator() documentation (https://docs.djangoproject.com/en/dev/ref/models/querysets/#iterator) says
(internally, the default iterator calls iterator() and caches the return value)
I take "the default iterator" to mean the QuerySet __iter__() method.
This does not call iterator():
It only calls _fetch_all(), which as of this change
no longer calls iterator().
So this line in the documentation is no longer accurate. I think an appropriate fix would be to simply remove that line of quoted text from the docs.