[MERGE] trivial NotImplementedError and docstring tweaks

Martin Pool mbp at canonical.com
Thu Aug 17 07:38:34 BST 2006


On 17 Aug 2006, Andrew Bennetts <andrew at canonical.com> wrote:
> This patch mainly updates a bunch of NotImplementedErrors in bzrlib/branch.py
> from this style:
> 
>         raise NotImplementedError('foo is abstract')
> 
> to this:
> 
>         raise NotImplementedError(self.foo)

Thanks.  For those following along at home, the reason to do this is
that it it's not only simpler but also gives you a nice message like

  NotImplementedError: <bound method foo of <SomeSubclass at 21123123>>

Since these are often used for abstract methods seeing the instance's
class name is highly useful.

-- 
Martin




More information about the bazaar mailing list