def __init__(self, name, annotations, value_classes): self.name = name if annotations is not None: self._annotations = {item[0]: PropAnnotation(item[1]) for item in annotations.items()} else: self._annotations = PropSpec._EMPTY_DICT self.value_type = TypeInfo.from_classes(*value_classes) if value_classes else None
def __init__(self, name, page_class): LibraryItemBase.__init__(self, name) self._type_info = TypeInfo.from_classes(Tome, page_class) self._pages = {}