def aslice(self, offset): assert isinstance(self, Array) and isinstance(offset, Integer) offset = offset.int_val() if offset >= 0: return Array(self._list[offset:]) else: rt.throw(rt.wrap(u"offset must be an Integer >= 0"))
def aslice(self, offset): affirm(isinstance(self, Array), u"aset expects an Array as the first argument") affirm(isinstance(offset, Integer), u"aset expects an Integer as the second argument") offset = offset.int_val() if offset >= 0: return Array(self.list()[offset:]) else: rt.throw(rt.wrap(u"offset must be an Integer >= 0"))