Reduce need of backslash

Stephen Horne $$$$$$$$$$$$$$$$$ at $$$$$$$$$$$$$$$$$$$$.co.uk
Fri Sep 26 15:01:04 EDT 2003


On Fri, 26 Sep 2003 13:34:22 -0400, Nicolas Fleury
<nid_oizo at yahoo.com_remove_the_> wrote:

>What if the second line would be indented?  Indentation is already used 
>to determine blocks, why not instructions?  For example, the following 
>is not error-prone at all:
>
>a = 5 +
>     someFunc()
>
>Doesn't it stay with python minimalistic philosophy?

I don't know the original rationale, but to me this mostly looks ugly.
Maybe I'd get used to it if it happened a lot, but this is rarely an
issue in practice.

Basically, when I need to break an expression over multiple lines, the
odds are that it already has parentheses anyway. And I wouldn't indent
that way anyway, I'd do it as...

a = (  firstitem
     + seconditem
     + (  thirditem
        * fourthitem
       )
    )

... ie using indentation to clarify the structure of the expression
much as I would with block structuring - whether I was using Python or
some other language.

In a way I can imagine some value to putting a statement in
parentheses. It would look very Lispy, but then some would say that's
a good thing.

Occasionally, I go through a phase of thinking semicolons should be
used as compulsory statement terminators rather than as the rarely
used separators they are now - in which case '\' would be completely
redundant - but it really is a trivial issue, whereas the idea of
changing such a fundamental piece of syntax - well, don't go there.


-- 
Steve Horne

steve at ninereeds dot fsnet dot co dot uk




More information about the Python-list mailing list