[MERGE] Add Hooks.install_named_hook
Daniel Mark Watkins
D.M.Watkins at warwick.ac.uk
Mon Mar 10 19:41:25 GMT 2008
On Mon, 10 Mar 2008 21:29:26 +0200
Alexander Belchenko <bialix at ukr.net> wrote:
> Why we need new method with another name?
>
> def install_hook(self, hook_name, a_callable, label=None):
>
> is enough for me personally.
This is initially what I was doing. However, if we want people to name
their hooks (which I think we do), giving them a DeprecationWarning if
they don't do so is a Good Thing(TM).
> And in any case name_hook should be deprecated as well, IMO.
I was also going to do this, but people _may_ want to rename a hook (for
whatever reason), so I didn't. Also, people naming a hook twice still
ends up with it being named, so that's less of a problem. :)
Dan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080310/7df8cdaf/attachment.pgp
More information about the bazaar
mailing list