Python is readable

Kiuhnm kiuhnm03.4t.yahoo.it
Thu Mar 15 15:40:52 EDT 2012


On 3/15/2012 16:08, Chris Angelico wrote:
> On Fri, Mar 16, 2012 at 1:55 AM, Kiuhnm
> <kiuhnm03.4t.yahoo.it at mail.python.org>  wrote:
>> By the way, the more elaborate parsing consists of looking for an
>> END_OF_LINE followed by one or more spaces. It doesn't sound that
>> complicated.
>
> Only in the trivial case. What if you want to break your condition
> over multiple lines? (Although you have to parenthesize or backslash,
> so that's still unambig.) It's helpful to be explicit.

You said it yourself. Just look out for parentheses or backslashes.
C and C++ editors do that all the time with single-statement 
control-flow constructs.

>> And what about an editor which indent when you press the spacebar or tab?
>
> Sure, but a good editor helps out by noticing that you did something
> that begs for indentation. If I put an open brace, SciTE will indent -
> very simple rule.

What about braces in strings? There's always some parsing going on and 
since you probably want syntax highlighting and maybe code 
autocompletion, what's the problem with missing colons?

Moreover, I think that
   if (............
       ............
       ............):
       ............
       ............
       ............
is not very readable anyway.

Kiuhnm



More information about the Python-list mailing list