mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
SF #754014: list.index() should accept optional start, end arguments
Also, modified UserList.index() to match and expanded the related tests.
This commit is contained in:
parent
c8106e1f1d
commit
d05abdec7b
5 changed files with 39 additions and 6 deletions
|
@ -75,7 +75,7 @@ class UserList:
|
|||
def pop(self, i=-1): return self.data.pop(i)
|
||||
def remove(self, item): self.data.remove(item)
|
||||
def count(self, item): return self.data.count(item)
|
||||
def index(self, item): return self.data.index(item)
|
||||
def index(self, item, *args): return self.data.index(item, *args)
|
||||
def reverse(self): self.data.reverse()
|
||||
def sort(self, *args): self.data.sort(*args)
|
||||
def extend(self, other):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue