Lichen

Change of lib/__builtins__/sequence.py

356:8327049267bf
lib/__builtins__/sequence.py
     1.1 --- a/lib/__builtins__/sequence.py	Fri Dec 09 16:26:50 2016 +0100
     1.2 +++ b/lib/__builtins__/sequence.py	Fri Dec 09 17:27:30 2016 +0100
     1.3 @@ -19,7 +19,7 @@
     1.4  this program.  If not, see <http://www.gnu.org/licenses/>.
     1.5  """
     1.6  
     1.7 -import native
     1.8 +from native import isinstance as _isinstance
     1.9  
    1.10  class itemaccess:
    1.11  
    1.12 @@ -42,13 +42,13 @@
    1.13          # Normalise any integer indexes, converting negative indexes to positive
    1.14          # ones.
    1.15  
    1.16 -        if native.isinstance(index, int):
    1.17 +        if _isinstance(index, int):
    1.18              index = _get_absolute_index(index, self.__len__())
    1.19              return self.__get_single_item__(index)
    1.20  
    1.21          # Handle slices separately.
    1.22  
    1.23 -        elif native.isinstance(index, slice):
    1.24 +        elif _isinstance(index, slice):
    1.25              return self.__getslice__(index.start, index.end, index.step)
    1.26  
    1.27          # No other kinds of objects are supported as indexes.
    1.28 @@ -63,13 +63,13 @@
    1.29          # Normalise any integer indexes, converting negative indexes to positive
    1.30          # ones.
    1.31  
    1.32 -        if native.isinstance(index, int):
    1.33 +        if _isinstance(index, int):
    1.34              index = _get_absolute_index(index, self.__len__())
    1.35              return self.__set_single_item__(index, value)
    1.36  
    1.37          # Handle slices separately.
    1.38  
    1.39 -        elif native.isinstance(index, slice):
    1.40 +        elif _isinstance(index, slice):
    1.41              return self.__setslice__(index.start, index.end, value)
    1.42  
    1.43          # No other kinds of objects are supported as indexes.