allowing braces around suites

Antoon Pardon apardon at forel.vub.ac.be
Fri Aug 27 11:17:53 EDT 2004


Op 2004-08-27, Anthony Baxter schreef <anthonybaxter at gmail.com>:
> On Fri, 27 Aug 2004 14:55:26 +0200, Kjetil Torgrim Homme
>> thank you for the reference!  I'm happy to see that Guido wasn't
>> strictly opposed to such a feature 10 years ago.
>
> Regardless of what he thought back then, I think I can say with
> absolutely no fear of contradiction that there is no chance in hell of
> braces appearing in Python... ever.
>
> If your tool gets something wrong, fix the tool, don't try and change
> the language, just for the convenience of a broken tool.

Well people do make mistakes and it would be helpfull if the language
provides some feautures to help in repairing those mistakes.

It has happend that through some faulty manipulations code that
came after a loop became indented at the same level as the loop.
Because python has no end-markers that meant it wasn't obvious
to spot where the loop was supposed to stop and from where I
had to start deindenting the code.

Now of course I can remedy this situation by using comments
like #end, #if etc. That will make it obvious to correct such
mistakes. However I think one could argue that providing such
endmarkers helps readability as much as indenting code does
and since that is the principal argument for the enforced
indentation, one could consider the case for endmarkers.

-- 
Antoon Pardon



More information about the Python-list mailing list