mirror of
https://github.com/django/django.git
synced 2025-09-24 19:23:03 +00:00
[py3] Removed longs.
This commit is contained in:
parent
f1d5dc81ac
commit
56dbe924a6
26 changed files with 99 additions and 78 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue