Missing destroyed attribute on OphydObject#1198
Conversation
|
We are tracking if destroy has been called in Why do you need to check if an object has been destroyed? |
|
It is more a question of consistency: This caught me very much by surprise that although it implements the |
|
I think nothing has public API to check if If we want to lift "have I been destroyed" up to public state and add it to the protocols, we can talk about that. However, I am still not clear why you would check if something has been destroyed or not (it appears the only place we call it in ophyd is in the test suite where we create and discard many objects, but when we call |
Description
While
OphydObjectimplements thedestroymethod, it does not provide the_destroyedattribute. The latter is only implemented onDevice. Given the "_", I assume it is not meant to be used directly, yet I'm not aware of another way to check whether an object was destroyed. In the absence of a more elegant solution, I'd suggest to add the_destroyedattribute to theOphydObjectclass to make available e.g. to aSoftPositioner.Related Issues
#1095
Type of Change
_destroyedattribute toOphydObject_destroyedto True after a call todestroyed