Lazily registering hooks?
Vincent Ladeuil
v.ladeuil+lp at free.fr
Mon May 31 07:40:56 BST 2010
A couple of related ideas in addition of the ones already mentioned in
this thread:
- the main problem with hook (and command !) registrations is the
requirement to import the module,
- the main achievement of lazy loading is that the module import is
delayed until needed.
To achieve the same result with hooks, some centralization is required
such as the bzrlib.hooks.known_hooks one (but nothing more).
If we add the indication that a hook is fully loaded, it becomes
possible to check for it before firing this hook.
More information about the bazaar
mailing list