[Python-ideas] Implicit string literal concatenation considered harmful?

Chris Angelico rosuav at gmail.com
Thu May 16 20:20:47 CEST 2013


On Fri, May 17, 2013 at 4:14 AM, Bruce Leban <bruce at leapyear.org> wrote:
>
> On Thu, May 16, 2013 at 10:38 AM, MRAB <python at mrabarnett.plus.com> wrote:
>>
>> Why do you say """there must be at least one whitespace character
>> between the \ and the comment"""?
>
>
> Two reasons:
>
> (1) make the backslash more likely to stand out visually (and we can't
> require a space before it)
>
> (2) \# looks like it might be an escape sequence of some sort while I don't
> think \ # does, making this friendlier to readers.
>
> I'm not passionate about that detail if the rest of the proposal flies.

Spin that off as a separate thread, I think the change to the
backslash rules stands alone. I would support it; allowing a
line-continuation backslash to be followed by a comment is a Good
Thing imo.

ChrisA


More information about the Python-ideas mailing list