1.1 --- a/lib/builtins.py Sun Jun 24 03:21:23 2007 +0200
1.2 +++ b/lib/builtins.py Sun Jun 24 20:03:01 2007 +0200
1.3 @@ -474,10 +474,9 @@
1.4 return self != 0
1.5
1.6 class list:
1.7 - def __init__(self, args=None):
1.8 - if args is not None:
1.9 - for arg in args:
1.10 - self.append(arg)
1.11 + def __init__(self, args=()):
1.12 + for arg in args:
1.13 + self.append(arg)
1.14
1.15 def __getitem__(self, index):
1.16 if -len(self) <= index < len(self):
1.17 @@ -776,6 +775,15 @@
1.18 def __init__(self, x=None):
1.19 x.__str__()
1.20
1.21 + def __getitem__(self, index):
1.22 + if -len(self) <= index < len(self):
1.23 + return str()
1.24 + else:
1.25 + raise IndexError, index
1.26 +
1.27 + def __getslice__(self, start, end=None):
1.28 + return str()
1.29 +
1.30 def __iadd__(self, other):
1.31 if isinstance(other, str):
1.32 return str()
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/lib/sys.py Sun Jun 24 20:03:01 2007 +0200
2.3 @@ -0,0 +1,8 @@
2.4 +#!/usr/bin/env python
2.5 +
2.6 +argv = ["python"]
2.7 +
2.8 +def setrecursionlimit(n):
2.9 + pass
2.10 +
2.11 +# vim: tabstop=4 expandtab shiftwidth=4