Thanks for the hint, I just found out about this too.
In my first attempt to implement a 'clean' way of control wrapper removal I just called the __del__() method explicitely. However, this looks a bit strange. Maybe a purge_controls() method in the ControlWrapper class that has to be called right before deletion but also is ensured to be called by the destructor would be a good idea?
Anyhow, a user might then call the purge_controls() method but not delete the wrapper. If the wrapper is then used elsewhere it leads to a lot of exceptions if any of the __getattr__/__setattr__ methods are called.
I will think about it in more detail and maybe create a blueprint for a possible change in the ControlWrapper class
Thanks for the hint, I just found out about this too.
In my first attempt to implement a 'clean' way of control wrapper removal I just called the __del__() method explicitely. However, this looks a bit strange. Maybe a purge_controls() method in the ControlWrapper class that has to be called right before deletion but also is ensured to be called by the destructor would be a good idea? _/__setattr_ _ methods are called.
Anyhow, a user might then call the purge_controls() method but not delete the wrapper. If the wrapper is then used elsewhere it leads to a lot of exceptions if any of the __getattr_
I will think about it in more detail and maybe create a blueprint for a possible change in the ControlWrapper class