#37039 closed Cleanup/optimization (fixed)
Outdated QuerySet.iterator() documentation
| Reported by: | Lincoln | Owned by: | MANAS MADESHIYA |
|---|---|---|---|
| Component: | Documentation | Version: | dev |
| Severity: | Normal | Keywords: | |
| Cc: | Lincoln | Triage Stage: | Ready for checkin |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | yes | 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.
Change History (8)
comment:1 by , 4 weeks ago
| Cc: | added |
|---|
comment:2 by , 4 weeks ago
| Triage Stage: | Unreviewed → Accepted |
|---|---|
| Version: | → dev |
comment:3 by , 4 weeks ago
| Owner: | set to |
|---|---|
| Status: | new → assigned |
comment:4 by , 4 weeks ago
| Cc: | removed |
|---|---|
| Has patch: | set |
comment:5 by , 2 weeks ago
| Easy pickings: | set |
|---|---|
| Patch needs improvement: | set |
comment:6 by , 9 days ago
| Patch needs improvement: | unset |
|---|---|
| Triage Stage: | Accepted → Ready for checkin |
Thank you for the ticket and analysis. I agree we can remove the text in the brackets