(self, item)
| 23 | return len(self.tmp) |
| 24 | |
| 25 | def __getitem__(self, item): |
| 26 | if isinstance(item, int): |
| 27 | if item >= len(self) or item < -len(self): # type:ignore |
| 28 | raise IndexError(f'Index {item} out of range!') |
| 29 | else: |
| 30 | # keep the dimension |
| 31 | item = slice(item, None, len(self)) |
| 32 | return TmpObject(self.tmp[item]) |
| 33 | |
| 34 | @staticmethod |
| 35 | def cat(tmp_objs): |