diff options
author | Raymond Hettinger <python@rcn.com> | 2003-06-17 05:05:49 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2003-06-17 05:05:49 (GMT) |
commit | d05abdec7b2620449369bb44a617684463ba50ac (patch) | |
tree | cb20408dd9bf2d158586d3187e22438b4427288e /Lib/UserList.py | |
parent | c8106e1f1dbd00e64aff6ecc5ecb53010168dd27 (diff) | |
download | cpython-d05abdec7b2620449369bb44a617684463ba50ac.zip cpython-d05abdec7b2620449369bb44a617684463ba50ac.tar.gz cpython-d05abdec7b2620449369bb44a617684463ba50ac.tar.bz2 |
SF #754014: list.index() should accept optional start, end arguments
Also, modified UserList.index() to match and expanded the related tests.
Diffstat (limited to 'Lib/UserList.py')
-rw-r--r-- | Lib/UserList.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/UserList.py b/Lib/UserList.py index 76cf31f..dd1b927 100644 --- a/Lib/UserList.py +++ b/Lib/UserList.py @@ -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): |