From: Diego Novillo <dnovillo@google.com>
To: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] validate_failures.py: Fix performance regression
Date: Fri, 07 Dec 2012 15:32:00 -0000 [thread overview]
Message-ID: <CAD_=9DSbFoRPesGKf4m+1j-7zTdH4mzxHwBWw+AYcdh1ocxcMg@mail.gmail.com> (raw)
In-Reply-To: <1354817522-18274-1-git-send-email-rep.dot.nop@gmail.com>
On Thu, Dec 6, 2012 at 1:12 PM, Bernhard Reutner-Fischer
<rep.dot.nop@gmail.com> wrote:
> def IsComment(line):
> """Return True if line is a comment."""
> - return line.startswith('#')
> + return bool(re.matches("#", line))
startswith() is a better match here.
> def IsInclude(line):
> """Return True if line is an include of another file."""
> - return line.startswith("@include ")
> + return bool(re.matches("@include ", line))
Likewise.
> def IsNegativeResult(line):
> """Return True if line should be removed from the expected results."""
> - return line.startswith("@remove ")
> + return bool(re.matches("@remove ", line))
Likewise.
OK with those changes.
Diego.
next prev parent reply other threads:[~2012-12-07 15:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-04 9:24 [PATCH] validate_failures.py: also ignore .git Bernhard Reutner-Fischer
2012-12-04 13:54 ` Diego Novillo
2012-12-05 7:35 ` Bernhard Reutner-Fischer
2012-12-06 18:12 ` [PATCH] validate_failures.py: Fix performance regression Bernhard Reutner-Fischer
2012-12-07 15:32 ` Diego Novillo [this message]
2012-12-13 15:12 ` Bernhard Reutner-Fischer
2012-12-17 15:09 ` Diego Novillo
2013-02-06 16:56 ` Bernhard Reutner-Fischer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAD_=9DSbFoRPesGKf4m+1j-7zTdH4mzxHwBWw+AYcdh1ocxcMg@mail.gmail.com' \
--to=dnovillo@google.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=rep.dot.nop@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).