Python and Ruby

John Bokma john at
Mon Feb 1 04:30:15 CET 2010

Steven D'Aprano <steven at> writes:

> On Sun, 31 Jan 2010 18:47:42 -0600, John Bokma wrote:
>> Steven D'Aprano <steve at> writes:
>>> On Sun, 31 Jan 2010 14:47:08 -0600, John Bokma wrote:
>>>> An editor can correct the indenting of the braces example but can't
>>>> with this one.
>>>>   if x:
>>>>       if y:
>>>>          foo()
>>>>   else:
>>>>       bar()
>>>> While braces might be considered redundant they are not when for one
>>>> reason or another formatting is lost or done incorrectly.
>>> I've heard this argument before, and I don't buy it. Why should we
>>> expect the editor to correct malformed code?
>> Or a prettyfier. It doesn't matter. The point is that with braces there
>> *is* redundancy that be used to fix the code.
> Prettyfiers are significant in languages that allow braces (or begin/end 
> tokens) and indentation to go out of sync. Since that can't happen with 
> Python,

Yes it can. I *have* seen Python with broken indentation on web
pages, and good luck sorting it out. Blaming it on "broken tools" is
just another straw man. It happens, and if you're learning Python and
interested in that code you have a problem.

Snipped the rest, because you start to sound like a zealot. I should've
know better.

John Bokma                                                               j3b

Hacking & Hiking in Mexico - - Perl & Python Development

More information about the Python-list mailing list