Esempio n. 1
0
    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)
Esempio n. 2
0
 def __getitem__(self, key):
     if isinstance(self, LoadableTerm):
         raise NonSliceableTerm(term=self)
     return Slice(self, key)