1.1 --- a/lib/builtins.py Sun Aug 22 20:35:20 2010 +0200
1.2 +++ b/lib/builtins.py Mon Aug 23 00:15:03 2010 +0200
1.3 @@ -26,6 +26,7 @@
1.4
1.5 class basestring(object):
1.6 def __init__(self, x=None): pass
1.7 + def __contains__(self, value): pass
1.8
1.9 def __getitem__(self, index):
1.10 # Note usage.
1.11 @@ -49,6 +50,9 @@
1.12 def __str__(self): pass
1.13 def __bool__(self): pass
1.14 def join(self, l): pass
1.15 + def split(self, s): pass
1.16 + def startswith(self, s): pass
1.17 + def endswith(self, s): pass
1.18
1.19 class bool(object):
1.20 def __bool__(self): pass
1.21 @@ -71,7 +75,9 @@
1.22 KeyError
1.23
1.24 class file(object):
1.25 + def read(self, n=None): pass
1.26 def write(self, s): pass
1.27 + def close(self): pass
1.28
1.29 class float(object):
1.30 def __init__(self, number_or_string=None): pass
1.31 @@ -160,8 +166,7 @@
1.32 self.__new__()
1.33
1.34 if args is not None:
1.35 - for arg in args:
1.36 - self.append(arg)
1.37 + self.extend(args)
1.38
1.39 def __new__(self):
1.40 # Reserve space for a fragment reference.
1.41 @@ -171,10 +176,20 @@
1.42 # Note usage.
1.43 IndexError
1.44
1.45 + def __contains__(self, value): pass
1.46 def __setitem__(self, index, value): pass
1.47 def __getslice__(self, start, end=None): pass
1.48 def __setslice__(self, start, end, slice): pass
1.49 def append(self, value): pass
1.50 +
1.51 + def extend(self, iterable):
1.52 +
1.53 + "Extend the list with the contents of 'iterable'."
1.54 +
1.55 + for i in iterable:
1.56 + self.append(i)
1.57 +
1.58 + def sort(self, cmp=None, key=None, reverse=0): pass
1.59 def __len__(self): pass
1.60 def __add__(self, other): pass
1.61 def __iadd__(self, other): pass