1
0
mirror of https://github.com/django/django.git synced 2025-10-29 16:46:11 +00:00

Replaced and...or... constructs with PEP 308 conditional expressions.

This commit is contained in:
Ramiro Morales
2013-05-26 23:47:50 -03:00
parent d228c1192e
commit 0fa8d43e74
25 changed files with 37 additions and 39 deletions

View File

@@ -125,7 +125,7 @@ class QuerySet(object):
else:
stop = None
qs.query.set_limits(start, stop)
return k.step and list(qs)[::k.step] or qs
return list(qs)[::k.step] if k.step else qs
qs = self._clone()
qs.query.set_limits(k, k + 1)