Return ``True`` if this object has an identity key. This should always have the same value as the expression ``state.persistent`` or ``state.detached``.
(self)
| 456 | |
| 457 | @property |
| 458 | def has_identity(self) -> bool: |
| 459 | """Return ``True`` if this object has an identity key. |
| 460 | |
| 461 | This should always have the same value as the |
| 462 | expression ``state.persistent`` or ``state.detached``. |
| 463 | |
| 464 | """ |
| 465 | return bool(self.key) |
| 466 | |
| 467 | @classmethod |
| 468 | def _detach_states( |