diff --git a/fatamorgana/records.py b/fatamorgana/records.py index d99fcbb..472e91a 100644 --- a/fatamorgana/records.py +++ b/fatamorgana/records.py @@ -16,6 +16,8 @@ import copy import math import zlib import io +import logging +import pprint from .basic import AString, NString, repetition_t, property_value_t, real_t, \ ReuseRepetition, OffsetTable, Validation, read_point_list, read_property_value, \ @@ -24,6 +26,9 @@ from .basic import AString, NString, repetition_t, property_value_t, real_t, \ write_property_value, read_bool_byte, write_bool_byte, read_byte, write_byte, \ InvalidDataError, PathExtensionScheme + +logger = logging.getLogger(__name__) + ''' Type definitions ''' @@ -186,6 +191,9 @@ class Record(metaclass=ABCMeta): """ return copy.deepcopy(self) + def __repr__(self) -> str: + return '{}: {}'.format(self.__class__, pprint.pformat(self.__dict__)) + def read_refname(stream: io.BufferedIOBase, is_present: bool,