[PATCH 2 of 4] largefiles: remove confusing 'or None' from predicate

Matt Mackall mpm at selenic.com
Mon Nov 3 15:52:25 CST 2014


On Mon, 2014-11-03 at 16:40 +0000, Martin von Zweigbergk wrote:
> On Mon Nov 03 2014 at 8:11:50 AM Mads Kiilerich <mads at kiilerich.com> wrote:
> 
> > On 11/03/2014 02:40 AM, Martin von Zweigbergk wrote:
> > > I don't think matchfn is ever set to None anywhere else (and I have
> > > been staring at matcher code for the last week), so that's probably
> > > not the reason.
> >
> > We have some occurences of 'matchfn = None' and we have several boolean
> > checks on matchfns. But I doubt it makes any difference here.
> >
> 
> I suspect all those cases are the _matcher_ being checked or assigned to.
> I.e, we may have "matchfn = None" and "if matchfn", but not "match.matchfn
> = None" nor "if match.matchfn" (the "matchfn" you are referring to should
> probably be called "match[er]").

We've long deprecated using the "x and y or z" pseudo-trinary. It's only
not in check-code because we have a bunch of them to clean up still.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list