Django Book 翻译
菜单>:
TOC
返回
原文:
Generally, slicing a ``QuerySet`` returns a new ``QuerySet`` it doesnt evaluate the query. An exception is if you use the step parameter of Python slice syntax. For example, this would actually execute the query in order to return a list of every *second* object of the first ten:
翻译:
一般地,对 ``QuerySet`` 进行切片会返回一个新的 ``QuerySet`` ,但并不执行查询。如果你在Python切片语法中使用步长参数的话,就会出现特例。例如,要返回前十个对象中的偶序数对象的列表时,实际上会执行查询:
备注:
译者: