[Python-Dev] PEP 340 - possible new name for block-statement

Aahz aahz at pythoncraft.com
Fri Apr 29 19:42:32 CEST 2005


On Fri, Apr 29, 2005, Guido van Rossum wrote:
> [Phillip J. Eby]
>>
>> Although I'd personally prefer a no-keyword approach:
>> 
>>      synchronized(self):
>>          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.

I'm still -1 for the same reason I mentioned earlier: function calls
spanning multiple lines are moderately common in Python code, and it's
hard to distinguish these cases because multi-line calls usually get
indented like blocks.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"It's 106 miles to Chicago.  We have a full tank of gas, a half-pack of
cigarettes, it's dark, and we're wearing sunglasses."  "Hit it."


More information about the Python-Dev mailing list