Opened 15 years ago

Closed 15 years ago

Last modified 13 years ago

#11188 closed (fixed)

Contradiction in queryset documentation re slices

Reported by: anonymous Owned by: Karen Tracey
Component: Documentation Version: dev
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

There seems to be a contradiction in the "Limiting Queryset" documentation at

http://docs.djangoproject.com/en/dev/topics/db/queries/#id4

as it pertains to the third 'step' pamameter in slices.

It states that

'Negative indexing (i.e. Entry.objects.all()[-1]) is not supported, nor is the third "step" slice parameter.'

The next paragraph, however, explains how things work when the "step" parameter is used. It seems, then, that the "step" parameter *is* supported. This appears to be a contradiction.

Change History (3)

comment:1 by Karen Tracey, 15 years ago

Owner: changed from nobody to Karen Tracey
Status: newassigned
Triage Stage: UnreviewedAccepted

That note was added in r10371, I'm not sure why. The ticket that requests a note on negative indexing not being supported doesn't mention step, and a cursory search for a ticket that might have triggered that note (as r10371 fixed bunches of tickets) doesn't reveal it. Testing shows step is indeed supported so the note is wrong.

comment:2 by Karen Tracey, 15 years ago

Resolution: fixed
Status: assignedclosed

(In [10835]) Fixed #11188 -- Removed incorrect doc note about step being unsupported when slicing query sets.

comment:3 by Jacob, 13 years ago

milestone: 1.1

Milestone 1.1 deleted

Note: See TracTickets for help on using tickets.
Back to Top