#27592 closed Cleanup/optimization (fixed)
QueryDict docs don't mention that iter methods are available only on Python 2
Reported by: | Tzu-ping Chung | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The documentation does not make distinctions between Python 2 and 3 APIs, and lists both iter- and non-iter- methods. This gives an impression that both names are available for all Python versions, while in fact Python 3 does not have the iterator-based methods under iter- names. While the rule makes sense (being consistent with core Python), it should be made clear in documentation.
Attachments (1)
Change History (7)
comment:1 by , 8 years ago
Has patch: | set |
---|---|
Summary: | QueryDict documentation is misleading → QueryDict docs don't mention that iter methods are available only on Python 2 |
Triage Stage: | Unreviewed → Accepted |
by , 8 years ago
Attachment: | 27592.diff added |
---|
comment:2 by , 8 years ago
I think it’s useful to document at least lists() to mention it behaves differently on Python 2 and 3. It would be nice if there are refs in iter- methods to non-iter- methods and vice versa, but that might be just me thinking too much.
comment:3 by , 8 years ago
If you want to submit a patch, I'll take a look, but I don't know if it's worth spending much time on considering that Django will drop Python 2 support in master next month.
comment:4 by , 8 years ago
I don't know if it's worth spending much time on considering that Django will drop Python 2 support in master next month.
Ah, good point. The previous patch would be enough then.
Is the attached patch sufficient?