#16698: Docs: QuerySet slicing (SQL LIMIT) -------------------------------------+------------------------------------- Reporter: guettli | Owner: nobody Type: | Status: new Cleanup/optimization | Component: Documentation Milestone: | Severity: Normal Version: 1.3 | Keywords: Resolution: | Has patch: 0 Triage Stage: | Needs tests: 0 Unreviewed | Easy pickings: 0 Needs documentation: 0 | Patch needs improvement: 0 | UI/UX: 0 | -------------------------------------+-------------------------------------
Comment (by aaugustin): !QuerySets behave consistently with both SQL and Python: {{{ $ sqlite3 sqlite> create table foo (id int); sqlite> insert into foo (id) values (1); sqlite> insert into foo (id) values (2); sqlite> select * from foo limit 5; 1 2 sqlite> }}} {{{ $ python >>> range(4)[:5] [0, 1, 2, 3] >>> }}} So the behavior of !QuerySets is natural and expected. In order to keep the docs straightforward, I think it's best to keep the text as is. -- Ticket URL: <https://code.djangoproject.com/ticket/16698#comment:2> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.