base.py 283B

12345678910111213141516
  1. # coding: utf-8
  2. class BaseObject(object):
  3. def repr_debug(self) -> str:
  4. return type(self).__name__
  5. class IdentifiedObject(BaseObject):
  6. def __init__(self, *args, **kwargs):
  7. self._id = id(self)
  8. @property
  9. def id(self) -> int:
  10. return self._id