logilab-common #98742 make it easy to store instances in registries, not only classes [done]
it is useful for at least http://www.cubicweb.org/ticket/2406609 | |
priority | normal |
---|---|
type | enhancement |
done in | 0.59.0 |
load | 0.500 |
load left | 0.000 |
closed by | #dc5f7cbd3134 [registry] introduce RegistrableObject and RegistrableInstance base classes. Closes #98742, #99757eea1647 [registry] introduce objid/objname method on registries instead of using function/inlined code. Partially closes #98742 |
Comments
-
2012/12/18 08:32, written by fcayre
-
2012/12/18 10:25, written by acampeas
add commentPatch https://www.logilab.org/patch/111692 aims at making it possible to register/ unregister instances automatically. This could be made possible using stack inspection in the __init__ method of a dedicated RegistrableInstance class.
I'm not too fond of a stack-inspection technique, which will be obscure and unobvious to maintain.
I wonder what's the problem with the current way (apart from gut feelings/cosmetics).