[New-bugs-announce] [issue7391] Re-title the "Using Backslash to Continue Statements" anti-idiom

Neil Cerutti report at bugs.python.org
Tue Nov 24 15:19:23 CET 2009


New submission from Neil Cerutti <cerutti at trans-video.net>:

This "anti-idiom" is in the Python HOWTOs->Idioms and Anti-Idioms

The current title is "Using Backslash to Continue Statements"

However, using the line continuation character won't cause mysterious
problems in statements, but only in certain expressions, as the article
goes on to explain.

Moreover, the proposed solution of wrapping expressions in parentheses
is a syntax error in a statement, e.g.:

with (open(roster_path, 'r') as roster_file,
      open(disb_path, 'w') as out_file,
      open(report_path, 'w') as report_file):
File "C:\project\codxml.py", line 184
   with (open(roster_path, 'r') as roster_file,
                                   ^
SyntaxError: invalid syntax

I suggest that the title be changed to "Using Backslash to Continue
Expressions."

I'm sorry I don't know for sure when this HOWTO was first included in
the normal Python distribution.

----------
assignee: georg.brandl
components: Documentation
messages: 95676
nosy: Horpner, georg.brandl
severity: normal
status: open
title: Re-title the "Using Backslash to Continue Statements" anti-idiom
versions: Python 3.0, Python 3.1, Python 3.2

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7391>
_______________________________________


More information about the New-bugs-announce mailing list