Code

Opened 5 years ago

Closed 5 years ago

#11724 closed (wontfix)

Python slice syntax is not the same as SQL offset limit syntax

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

Description

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

The docs infer that when slicing you specify the start record and an offset, Python slice syntax requires the first record to show and the first record not to show, something totally different.

SQL: start record, show n records
python slice: show records >= n, don't show records >= n

The way it's worded is very misleading for those unfamiliar with python slice syntax.

Attachments (0)

Change History (1)

comment:1 Changed 5 years ago by Alex

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to wontfix
  • Status changed from new to closed

The docs are quite clear, the second example in particular addresses your concern. If you have a particular suggestion as to how this could be reworded feel free to reopen, but I think it's fine.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.