[Python-ideas] An Alternate Suite Delineation Syntax For Python? (was Re: [Python-Dev] [PATCH] Adding braces to __future__)

Terry Reedy tjreedy at udel.edu
Sun Dec 11 01:46:11 CET 2011

On 12/10/2011 12:06 AM, Nick Coghlan wrote:

>    4. Returns the value of the last statement in the suite as the
> result of the suite expression (since return statements would affect
> the containing scope)

I believe you mean return the value of the last statement that is 
executed, as in the try-except example or the conditional example:
     {: if a {:b} else {:c}}

I must congratulate you, Nick, for being the first person in my 14 years 
with Python to make a brace idea look half-way sensible. I can see that 
algorithmically generated code (which includes templates) might be a 
real use case.

Terry Jan Reedy

More information about the Python-ideas mailing list