Style question
François Pinard
pinard at iro.umontreal.ca
Thu Jul 8 08:40:24 EDT 2004
[Leif K-Brooks]
> But what is the most readable thing to do when that's impossible? For
> instance, where should the second variable name be wrapped to in this
> line?
> really_really_long_variable_name =
> another_even_longer_variable_name_with_cookies
I would suggest one of two writings. Some people would do:
really_really_long_variable_name = \
another_even_longer_variable_name_with_cookies
yet I prefer:
really_really_long_variable_name = (
another_even_longer_variable_name_with_cookies)
because I like to avoid escaped newlines (save in triple-quoted strings).
--
François Pinard http://www.iro.umontreal.ca/~pinard
More information about the Python-list
mailing list