line continuation for lines ending in "and" or "or"

Larry Bates larry.bates at websafe.com`
Thu Jun 5 14:06:52 CEST 2008


Dennis Lee Bieber wrote:
> On Wed, 4 Jun 2008 21:50:19 -0700 (PDT), "Russ P."
> <Russ.Paielli at gmail.com> declaimed the following in comp.lang.python:
> 
>> Darnit! You're right. I've been reading up on Scala lately, and I
>> guess I got confused. Well, it wouldn't be a bad idea for Python to do
>> what I thought it did, *plus* what I said it ought to do.
>>
> 	Is it that much of a difficulty to start multiline expresssions with
> a (...
> 
> 	That already covers all the conditions you want... Or just using a
> line ending of \
> (which I find less appealing than the (... )

I suppose this is a matter of "taste".  I find using parenthesis to trigger line 
continuations undesirable.  Lines ending in backslash are explicit and easy to 
mentally parse.

-Larry



More information about the Python-list mailing list