Python is readable

Michael Torrie torriem at gmail.com
Thu Mar 15 18:12:28 EDT 2012


On 03/15/2012 01:40 PM, Kiuhnm wrote:
> Moreover, I think that
>    if (............
>        ............
>        ............):
>        ............
>        ............
>        ............
> is not very readable anyway.

Sure but neither is
    if (............ \
        ............ \
        ............)
        ............
        ............
        ............

In other words, with or without the : if you format your if statements
in an unreadable way, it will be unreadable.  Nothing to do with
python's syntax at all.

Now,
    if ............
       ............
       ............:
        ............
        ............
        ............

isn't too bad for readability.  In other words the C-ism of putting the
IF predicate in parenthesis normally doesn't belong in python, though
there are cases when you need to enforce a certain operator precedence,
granted.




More information about the Python-list mailing list