[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Lots of test suite code

From: Tripp Lilley <tlilley_at_perspex.com>
Date: 2001-05-09 03:10:09 CEST

On Tue, 8 May 2001, Greg Stein wrote:

> Stylistic nit on the above:
>
> if ignore_re.match(line) is not None:

        if ignore_re.match(line):
                ...

because an re will return a match object if it finds a match, which will
always evaluate to true (right?), and will return None if there's no
match. I'm not smoking, right? A re.Match object will never accidentally
evaluate to false, will it?

-- 
   Tripp Lilley  *  http://stargate.eheart.sg505.net/~tlilley/
--------------------------------------------------------------------------
  "If people would stop behaving like greedy idiots, I'd be sweetness
   and light every fucking day." - Dave Winer, Scripting News, 2001-04-11
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:30 2006

This is an archived mail posted to the Subversion Dev mailing list.