[MERGE] versionedfile.py code cleanups

Martin Pool mbp at sourcefrog.net
Thu Sep 20 06:21:09 BST 2007


On 9/20/07, Robert Collins <robertc at robertcollins.net> wrote:

> Well, I think you've made a generalisation of LBYL that is slightly
> different to its normal meaning, which is about not running code to
> check things that will be handled in due course. Specifically this stub
> method does not introduce race conditions that LBYL do, nor waste CPU
> time checking things that are checked later anyway etc.

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?)

However, I do think this meets that definition: we have code that
checks something which will be handled later perfectly well by a lower
layer.  It's true there is no run time cost because it should never be
called and no plausible chance of a race.

-- 
Martin



More information about the bazaar mailing list