mirror of
https://github.com/django/django.git
synced 2025-03-03 13:34:26 +00:00
Removed unused ListMixin._checkindex() correct kwarg.
Unused since its introduction in 66e1670efae34d721e374788e4c3f8b5fe5fa481.
This commit is contained in:
parent
e532bf7a90
commit
ce834d0891
@ -236,11 +236,11 @@ class ListMixin:
|
|||||||
def _set_single_rebuild(self, index, value):
|
def _set_single_rebuild(self, index, value):
|
||||||
self._set_slice(slice(index, index + 1, 1), [value])
|
self._set_slice(slice(index, index + 1, 1), [value])
|
||||||
|
|
||||||
def _checkindex(self, index, correct=True):
|
def _checkindex(self, index):
|
||||||
length = len(self)
|
length = len(self)
|
||||||
if 0 <= index < length:
|
if 0 <= index < length:
|
||||||
return index
|
return index
|
||||||
if correct and -length <= index < 0:
|
if -length <= index < 0:
|
||||||
return index + length
|
return index + length
|
||||||
raise IndexError('invalid index: %s' % index)
|
raise IndexError('invalid index: %s' % index)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user