mirror of
https://github.com/django/django.git
synced 2025-10-27 07:36:08 +00:00
Refs #23919 -- Removed six.<various>_types usage
Thanks Tim Graham and Simon Charette for the reviews.
This commit is contained in:
@@ -130,7 +130,7 @@ class Page(collections.Sequence):
|
||||
return len(self.object_list)
|
||||
|
||||
def __getitem__(self, index):
|
||||
if not isinstance(index, (slice,) + six.integer_types):
|
||||
if not isinstance(index, (int, slice)):
|
||||
raise TypeError
|
||||
# The object_list is converted to a list so that if it was a QuerySet
|
||||
# it won't be a database hit per __getitem__.
|
||||
|
||||
Reference in New Issue
Block a user