----- Original Message -----
From: "Graham Percival" <gra...@percival-music.ca>
To: "Phil Holmes" <m...@philholmes.net>
Cc: <philehol...@googlemail.com>; <percival.music...@gmail.com>;
<lilypond-devel@gnu.org>; <re...@codereview.appspotmail.com>
Sent: Monday, May 02, 2011 6:28 PM
Subject: Re: Fix error messages in website build (issue4428077)
On Mon, May 02, 2011 at 05:29:27PM +0100, Phil Holmes wrote:
>http://codereview.appspot.com/4428077/diff/1/scripts/build/extract_texi_filenames.py#newcode65
>scripts/build/extract_texi_filenames.py:65: known_missing_files = ''
>could this be a list instead of a string?
I thought about whether a string was the _best_ solution, but
decided that using a read() and find() was simplest and probably
quickest.
python has .readlines() for a file, and generally it's
"pythonesque" to use lists.
Just looked at this. readlines() leaves the newline character on the end of
each string in the list and so therefore the filename isn't found in the
list and therefore the error message is printed out. Now, it would be
possible to append the \n to the filename before the test, or to loop the
list and strip the \n, or a few other things, but it seems to me that this
is adding code that is peripheral to the main aim of the script. My
suggestion? Stick with the string version.
--
Phil Holmes
_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel