On Thu, Dec 6, 2012 at 1:12 PM, Bernhard Reutner-Fischer
<rep.dot....@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.

Reply via email to