This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Horpner
Recipients Horpner, georg.brandl
Date 2009-11-24.14:19:21
SpamBayes Score 4.5749097e-05
Marked as misclassified No
Message-id <1259072363.61.0.346322429524.issue7391@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2009-11-24 14:19:23Horpnersetrecipients: + Horpner, georg.brandl
2009-11-24 14:19:23Horpnersetmessageid: <1259072363.61.0.346322429524.issue7391@psf.upfronthosting.co.za>
2009-11-24 14:19:22Horpnerlinkissue7391 messages
2009-11-24 14:19:21Horpnercreate