[MERGE] versionedfile.py code cleanups

Martin Pool mbp at sourcefrog.net
Mon Sep 24 23:40:53 BST 2007


> > It's academic because I think it's reasonable to provide a docstring
> > for pure virtual methods, and in Python that means they must have a
> > body which should be a raise statement.  (Or maybe epydoc has a
> > special way to handle this?)
>
> Eh, no?  A docstring is a function body, for this purpose.
>
> Raising an exception is still a good idea, of course.

Yes, it's true that in

  def a():
    "something"
    pass

the pass is strictly redundant and I see no harm in leaving it out.
But if the method is really not implemented yet then I think it does
need to raise an exception, whether by AttributeError or an explicit
NotImplementedError.

-- 
Martin



More information about the bazaar mailing list