[Python-Dev] Re: PEP 340 - possible new name for block-statement
nidoizo at yahoo.com
Fri Apr 29 22:26:27 CEST 2005
Guido van Rossum wrote:
> [Nicolas Fleury]
>>scoped EXPR as VAR:
> Definitely not. In too many languages, a "scope" is a new namespace,
> and that's exactly what a block (by whichever name) is *not*.
Humm... what about "context"?
context EXPR as VAR:
I may answer the question myself, but is an alternative syntax without
an indentation conceivable? (yes, even since the implicit block could be
run multiple times). Because in that case, a keyword like "block" would
not look right.
It seems to me that in most RAII cases, the block could end at the end
of the current block and that's fine, and over-indentation can be
avoided. However, I realize that the indentation makes more sense in
the context of Python and removes some magic that would be natural for a
C++ programmer used to presence of stack... Ok, I answer my question,
but "context" still sounds nicer to me than "block";)
More information about the Python-Dev