Exemplo n.º 1
0
 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)
Exemplo n.º 2
0
 def __repr__(self) -> str:
     return utils.create_repr(self, ["id", "title"])
Exemplo n.º 3
0
 def __repr__(self) -> str:
     return utils.create_repr(self, ["id", "num", "cells"])