def __repr__(self) -> str: if hasattr(self, "id") and hasattr(self, "name"): attrs = ["name", "id"] elif hasattr(self, "id"): attrs = ["id"] elif hasattr(self, "name"): attrs = ["name"] else: return super().__repr__() return utils.create_repr(self, attrs)
def __repr__(self) -> str: return utils.create_repr(self, ["id", "title"])
def __repr__(self) -> str: return utils.create_repr(self, ["id", "num", "cells"])