class A(object): def __init__(self, data): self._data = data def _equals(self, other): # noinspection PyProtectedMember return self._data == other._data