1.1 --- a/lib/builtins.py Sat Jun 05 01:39:16 2010 +0200
1.2 +++ b/lib/builtins.py Fri Jun 11 00:56:08 2010 +0200
1.3 @@ -143,7 +143,22 @@
1.4 def __rrshift__(self): pass
1.5
1.6 class list(object):
1.7 - def __init__(self, args=()): pass
1.8 +
1.9 + "Implementation of list."
1.10 +
1.11 + def __init__(self, args=None):
1.12 +
1.13 + "Initialise the list."
1.14 +
1.15 + self.__new__()
1.16 +
1.17 + if args is not None:
1.18 + for arg in args:
1.19 + self.append(arg)
1.20 +
1.21 + def __new__(self):
1.22 + self._elements = None # defined in a native method
1.23 +
1.24 def __getitem__(self, index): pass
1.25 def __setitem__(self, index, value): pass
1.26 def __getslice__(self, start, end=None): pass