allowing braces around suites

Antoon Pardon apardon at forel.vub.ac.be
Mon Sep 6 02:46:39 EDT 2004


Op 2004-09-03, Ville Vainio schreef <ville at spammers.com>:
>>>>>> "Anton" == Antoon Pardon <apardon at forel.vub.ac.be> writes:
>
>
> [about block end markers]
>
>    Anton> But a lot of things are not necessary but ended up in
>    Anton> python because they were thought to be usefull. So that
>    Anton> this is not necessary can hardly be a strong point against
>    Anton> it.
>
> None of the useful stuff that has been added is redundant. At least I
> don't remember any addition that could be left away, and the code
> would run exactly the same.

That doesn't mean the addition was necessary. Necessary means that
you needed the addition to express something. That was often not
the case. If could have made expressing things easier, but that
doesn't make the addition necessary.


>    Anton> Explicit is better than implicit is one that comes to mind.
>    Anton> If python wouldn't do anything implicit then python would
>    Anton> be a whole different language and IMO would probably be far
>    Anton> less usefull.
>
> End markers are not any more explicit than using just the white space
> for blocks.

Yes they are. White space is in general ignored. a+b is the same as
a + b. There are also circumstances where it becomes hard to see
whether a certain dedention was 3 or 4 levels. That makes dedenting
an implicit way of marking the end of a suite.

> Besides, this discussion is rather pointless because Python already
> supports blck end markers. See pindent.py in your Python distribution
> or at:

No Python doesn't support end markers. That you can use an idiom of
comments to help the humean reader in distinghuishing the end of
a block is not the same as the language supporting end markes.

-- 
Antoon Pardon



More information about the Python-list mailing list