New submission from Neil Cerutti <ceru...@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 <rep...@bugs.python.org> <http://bugs.python.org/issue7391> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com