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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user