Idioms and Anti-Idioms Question
bcharrow at csail.mit.edu
Mon Jun 22 00:14:50 EDT 2009
I have a question about the "Using Backslash to Continue Statements" in the
howto "Idioms and Anti-Idioms in Python"
"...if the code was:
value = foo.bar()['first']*baz.quux(1, 2)[5:9] \
+ calculate_number(10, 20)*forbulate(500, 360)
then it would just be subtly wrong."
What is subtly wrong about this piece of code? I can't see any bugs and can't
think of subtle gotchas (e.g. the '\' is removed or the lines become separated,
because in both cases an IndentationError would be raised).
More information about the Python-list