multi-line statements

William Tanksley wtanksle at dolphin.openprojects.net
Thu Nov 2 12:38:06 EST 2000


On 2 Nov 2000 17:04:21 GMT, Michael P. Soulier wrote:
>    Hey guys. I personally like to wrap my lines at 80 columns, and I've
>noticed that I can do that in Python via \, but that's a little ugly. Out of
>curiousity, is there a better way to write multi-line statements? 

Sure.  If you end a line in the middle of a parenthesis, bracket, or
triplequote, the expression won't end until the line containing the
closing element.  So,

x = (3
     +
     1)

is valid.

>    Mike

-- 
-William "Billy" Tanksley



More information about the Python-list mailing list