[MERGE] (0.17) reworked LogFormatter API

Andrew Bennetts andrew at canonical.com
Thu May 24 13:33:12 BST 2007


Kent Gibson wrote:
[...]
> > -    if show_merge is not None and show_merge_revno is None:
> > +    legacy_lf = not getattr(lf, 'log_revision', None)
> >
> > I would also probably do this as:
> >
> > legacy_lf = getattr(...) is not None
> >
> I hope you mean:
> 
> legacy_lf = getattr() is None
> 
> And I prefer my way anyway - I think it reads better.

The fact that John misread it your way suggests it doesn't read very well ;)

FWIW, I also find "getattr(lf, 'log_revision', None) is None" over "not ..." to
be slightly clearer.  Negations tend to be confusing for humans.

-Andrew.




More information about the bazaar mailing list