[Python-ideas] Allowing comments after line continuations

Christian Tismer tismer at stackless.com
Fri May 17 00:46:41 CEST 2013


On 17.05.13 00:26, Greg Ewing wrote:
> Terry Jan Reedy wrote:
>> In a string, \ escapes the immediate next character. This idea of \ 
>> at the *end* of a line, just before the newline character, is that it 
>> escapes the newline, *just as is does within a string*.
>
> That's how it currently works, but that doesn't mean it's
> how it *should* work. Especially if it leads to counter-
> intuitive and less-than-useful behaviour, which IMO it
> does.
>
> In between tokens, we expect whitespace to be treated
> flexibly, in the sense that wherever one whitespace
> character is allowed, we can substitute more than one.
> Line continuation with backslash currently breaks that
> expectation.
>

I would appreciate it very much if "\" were more intelligent.
So intelligent, that I don't want to avoid it, but want to use it!
So let us make it ignore white-space and allow comments,
and I'll be more than happy with an ugly, but really useful back-slash !

+ 9**(9**9)

-- 
Christian Tismer             :^)   <mailto:tismer at stackless.com>
Software Consulting          :     Have a break! Take a ride on Python's
Karl-Liebknecht-Str. 121     :    *Starship* http://starship.python.net/
14482 Potsdam                :     PGP key -> http://pgp.uni-mainz.de
phone +49 173 24 18 776  fax +49 (30) 700143-0023
PGP 0x57F3BF04       9064 F4E1 D754 C2FF 1619  305B C09C 5A3B 57F3 BF04
       whom do you want to sponsor today?   http://www.stackless.com/



More information about the Python-ideas mailing list