Commit f0d46767 authored by Aymeric Augustin's avatar Aymeric Augustin
Browse files

Fixed #10139 -- Clarified that slicing an evaluated QuerySet returns a list,...

Fixed #10139 -- Clarified that slicing an evaluated QuerySet returns a list, not a QuerySet. Thanks ori for the patch.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@17383 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent 905e33f8
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -32,10 +32,11 @@ You can evaluate a ``QuerySet`` in the following ways:
          print e.headline

* **Slicing.** As explained in :ref:`limiting-querysets`, a ``QuerySet`` can
  be sliced, using Python's array-slicing syntax. Usually slicing a
  ``QuerySet`` returns another (unevaluated) ``QuerySet``, but Django will
  execute the database query if you use the "step" parameter of slice
  syntax.
  be sliced, using Python's array-slicing syntax. Slicing an unevaluated
  ``QuerySet`` usually returns another unevaluated ``QuerySet``, but Django
  will execute the database query if you use the "step" parameter of slice
  syntax, and will return a list. Slicing a ``QuerySet`` that has been
  evaluated (partially or fully) also returns a list.

* **Pickling/Caching.** See the following section for details of what
  is involved when `pickling QuerySets`_. The important thing for the