mirror of
https://github.com/django/django.git
synced 2025-10-29 08:36:09 +00:00
[py3] Removed longs.
This commit is contained in:
@@ -169,7 +169,7 @@ class QuerySet(object):
|
||||
"""
|
||||
Retrieves an item or slice from the set of results.
|
||||
"""
|
||||
if not isinstance(k, (slice, int, long)):
|
||||
if not isinstance(k, (slice,) + six.integer_types):
|
||||
raise TypeError
|
||||
assert ((not isinstance(k, slice) and (k >= 0))
|
||||
or (isinstance(k, slice) and (k.start is None or k.start >= 0)
|
||||
|
||||
Reference in New Issue
Block a user