Opened 17 years ago
Closed 17 years ago
#5409 closed (fixed)
Logic error in the db-api documentation
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Documentation | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
in http://www.djangoproject.com/documentation/db-api/#exclude-kwargs
This example excludes all entries whose pub_date is later than 2005-1-3 AND whose headline is NOT “Hello”
should read:
This example excludes all entries whose pub_date is later than 2005-1-3 OR whose headline is NOT “Hello”
That is because "select not x and not y" is equivalent to "select not (x or y)" and, therefore, "exclude x or y"
Attachments (2)
Change History (5)
by , 17 years ago
Attachment: | logic-error.diff added |
---|
comment:1 by , 17 years ago
comment:3 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
David is talking about the
example. But the sentence he suggests is also wrong, after applying the De Morgan's law as he rightly suggests it should read: