1
0
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:
Claude Paroz
2016-12-29 16:27:49 +01:00
parent f6acd1d271
commit 7b2f2e74ad
213 changed files with 574 additions and 763 deletions

View File

@@ -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__.