On 5/19/09, Jason Orendorff firstname.lastname@example.org wrote:
On Tue, May 19, 2009 at 1:15 PM, Raymond Hettinger email@example.com wrote: I find the long lines in my code are not as contrived as the thread so far suggests:
FWIW, I would find it easier to read all but one of these if they were broken into multiple lines -- and that is regardless of what monitor I happened to be using at the time.
sys.stderr.write("js-build: WARNING: Due to COMMAND_MODE
madness, this can fail on Leopard!\n" "js-build: Workaround is to upgrade to Python 2.5.2 or later.\n")
My idiom here is to take out the literal, at least to its own line. For example:
js-build: WARNING: Due to COMMAND_MODE madness, this can fail on Leopard! js-build: Workaround is to upgrade to Python 2.5.2 or later. """ sys.stderr.write(msg)
self.parent[id] = self.lastbranch.get(branch,
This was the only one where a line break might hurt readability for me, and I still suspect a rewording would make it easier to read.