"A.T.Hofkamp" <a.t.hofk...@tue.nl> wrote
Some people like the following layout

if long_function_name(a) == long_function_name(b) and \
   long_function_name(c) == long_function_name(d) and \
   long_function_name(e) == long_function_name(f):
    # do something if all three equalities hold

I prefer to use parens for that:

if ( long_function_name(a) == long_function_name(b) and long_function_name(c) == long_function_name(d) and long_function_name(e) == long_function_name(f) ):
    # do something if all three equalities hold


That increases the indent and avoids the pesky \ chars.
But it adds a hard-to-spot closing paren at the end :-(

--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/l2p/

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to