1.1 --- a/lib/__builtins__/tuple.py Fri Dec 09 16:26:50 2016 +0100
1.2 +++ b/lib/__builtins__/tuple.py Fri Dec 09 17:27:30 2016 +0100
1.3 @@ -21,7 +21,8 @@
1.4
1.5 from __builtins__.iterator import itemiterator
1.6 from __builtins__.sequence import sequence
1.7 -import native
1.8 +from native import list_element, list_init, list_len, list_setsize, \
1.9 + list_setelement
1.10
1.11 class tuple(sequence):
1.12
1.13 @@ -35,15 +36,15 @@
1.14 # for elements.
1.15
1.16 size = args is not None and len(args) or 0
1.17 - self.__data__ = native.list_init(size)
1.18 - native.list_setsize(self.__data__, size)
1.19 + self.__data__ = list_init(size)
1.20 + list_setsize(self.__data__, size)
1.21
1.22 # Populate the tuple.
1.23
1.24 if args is not None:
1.25 i = 0
1.26 for arg in args:
1.27 - native.list_setelement(self.__data__, i, arg)
1.28 + list_setelement(self.__data__, i, arg)
1.29 i += 1
1.30
1.31 def __getslice__(self, start, end=None):
1.32 @@ -56,7 +57,7 @@
1.33
1.34 "Return the length of the tuple."
1.35
1.36 - return native.list_len(self.__data__)
1.37 + return list_len(self.__data__)
1.38
1.39 def __add__(self, other): pass
1.40
1.41 @@ -87,7 +88,7 @@
1.42 "Return the item at the normalised (positive) 'index'."
1.43
1.44 self._check_index(index)
1.45 - return native.list_element(self.__data__, index)
1.46 + return list_element(self.__data__, index)
1.47
1.48 def __set_single_item__(self, index, value):
1.49