Guido van Rossum wrote:
[Nicolas Fleury]
scoped EXPR as VAR:
    BLOCK

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:
    BLOCK

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";)

Regards,
Nicolas

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to