On Sat, Dec 15, 2012 at 11:55 PM, boB Stepp <robertvst...@gmail.com> wrote: > On Sat, Dec 15, 2012 at 10:43 PM, Steven D'Aprano <st...@pearwood.info> wrote: > >> Two solutions are: >> >> * Add a space to the end of the backslashes. The space is invisible, and >> some editors may strip it out, so this is a fragile solution. > > In my efforts to understand what was going on, I discovered that > PyScripter's (My current editor that I am playing around with.) > default setting is to trim all line-ending spaces, running into > exactly what you say.
>From PEP 8: Don't write string literals that rely on significant trailing whitespace. Such trailing whitespace is visually indistinguishable and some editors (or more recently, reindent.py) will trim them. >> * Change the string to a raw string, r"""...""" so that backslash >> interpolation is turned off. > > And I suppose I could also escape the backslash (\\), too. But your > suggestion sounds the best. You could also store the string in a text file or database. P.S. For anyone using Gmail's new in-line reply box, the class to style it with a monospace font is .LW-avf. _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor