Opened 7 years ago

Closed 7 years ago

Last modified 5 years ago

#11188 closed (fixed)

Contradiction in queryset documentation re slices

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


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

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 Changed 7 years ago by kmtracey

  • Needs documentation unset
  • Needs tests unset
  • Owner changed from nobody to kmtracey
  • Patch needs improvement unset
  • Status changed from new to assigned
  • Triage Stage changed from Unreviewed to Accepted

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 Changed 7 years ago by kmtracey

  • Resolution set to fixed
  • Status changed from assigned to closed

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

comment:3 Changed 5 years ago by jacob

  • milestone 1.1 deleted

Milestone 1.1 deleted

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