(self)
| 2786 | self.close() |
| 2787 | |
| 2788 | def close(self): |
| 2789 | if ( |
| 2790 | self.__from_file is True |
| 2791 | and hasattr(self, "__data__") |
| 2792 | and ( |
| 2793 | (isinstance(mmap.mmap, type) and isinstance(self.__data__, mmap.mmap)) |
| 2794 | or "mmap.mmap" in repr(type(self.__data__)) |
| 2795 | ) |
| 2796 | ): |
| 2797 | self.__data__.close() |
| 2798 | del self.__data__ |
| 2799 | |
| 2800 | def __unpack_data__(self, format, data, file_offset): |
| 2801 | """Apply structure format to raw data. |