[MERGE] Add Hooks.install_named_hook

Alexander Belchenko bialix at ukr.net
Mon Mar 10 19:54:35 GMT 2008


Daniel Mark Watkins пишет:
> 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. :)

Yes, I understand. It just my 2 cents after reading your patch.



More information about the bazaar mailing list