[Python-ideas] Line continuations with comments

Chris Angelico rosuav at gmail.com
Wed May 22 18:08:58 CEST 2013


On Thu, May 23, 2013 at 12:31 AM, Mike Graham <mikegraham at gmail.com> wrote:
> On Wed, May 22, 2013 at 10:11 AM, Devin Jeanpierre <jeanpierreda at gmail.com>
> wrote:
>>
>> The way I see it, either one believes that backslashes belong in
>> Python -- and therefore they should be made as useful as possible --
>> or that they do not -- and therefore they should be crippled. But if
>> they don't belong in Python, they shouldn't be crippled, rather, they
>> shouldn't even exist.
>>
>> A compromise should at least be internally consistent.
>
>
> With changes a while back making backslash continuations never strictly
> necessary, it seems like officially declaring backslash deprecated might be
> reasonable. They are discouraged by PEP8 and other style guides and at this
> point they violate the "There should be one-- and preferably only one
> --obvious way to do it." principle.

Maybe the backslash should be considered on par with goto - some use
it occasionally and reckon it's vital, others never use it and
consider it superfluous. It's not (usually) a problem to have it in
the language, it's not deprecated, but style guides advise against its
use.

ChrisA


More information about the Python-ideas mailing list