1.1 --- a/lib/__builtins__/sequence.py Tue Nov 29 23:12:15 2016 +0100
1.2 +++ b/lib/__builtins__/sequence.py Tue Nov 29 23:13:18 2016 +0100
1.3 @@ -62,6 +62,19 @@
1.4
1.5 return False
1.6
1.7 + def index(self, value):
1.8 +
1.9 + "Return the index of 'value' or raise ValueError."
1.10 +
1.11 + i = 0
1.12 + l = len(self)
1.13 + while i < l:
1.14 + if self[i] == value:
1.15 + return i
1.16 + i += 1
1.17 +
1.18 + raise ValueError(value)
1.19 +
1.20 def __getitem__(self, index):
1.21
1.22 "Return the item or slice specified by 'index'."
1.23 @@ -81,7 +94,7 @@
1.24 # No other kinds of objects are supported as indexes.
1.25
1.26 else:
1.27 - raise TypeError
1.28 + raise TypeError()
1.29
1.30 def __setitem__(self, index, value):
1.31
1.32 @@ -102,7 +115,7 @@
1.33 # No other kinds of objects are supported as indexes.
1.34
1.35 else:
1.36 - raise TypeError
1.37 + raise TypeError()
1.38
1.39 def __getslice__(self, start, end=None):
1.40