[Python-Dev] PEP 340 - possible new name for block-statement
Shane Holloway (IEEE)
shane.holloway at ieee.org
Sat Apr 30 02:52:27 CEST 2005
Guido van Rossum wrote:
> [Phillip J. Eby]
>>Although I'd personally prefer a no-keyword approach:
>> with_file("foo") as f:
>> # etc.
> I'd like that too, but it was shot down at least once. Maybe we can
> resurrect it?
> opening("foo") as f:
> # etc.
> is just a beauty!
Certainly my favorite because it's direct and easy on the eyes. Second
in opening("foo") as f:
because I can see Aahz's point about introducing the block with a
keyword instead of relying on the ":" punctuation and subsequent
indentation of the block for skimming code.
More information about the Python-Dev