def __getitem__(self, key): if isinstance(self, LoadableTerm): raise NonSliceableTerm(term=self) from .mixins import SliceMixin slice_type = type(self)._with_mixin(SliceMixin) return slice_type(self, key)
def __getitem__(self, key): if isinstance(self, LoadableTerm): raise NonSliceableTerm(term=self) return Slice(self, key)