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

Nick Coghlan ncoghlan at gmail.com
Sun Dec 11 02:21:01 CET 2011


On Sun, Dec 11, 2011 at 10:46 AM, Terry Reedy <tjreedy at udel.edu> wrote:
> 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}}

Indeed, that was what I meant, albeit not what I wrote :)

> 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.

I actually surprised myself - I started writing that purely as a
devil's advocate "if you're going to rant about something to that
extent, you may as well *try* to be constructive" post, but the end
result was significantly less terrible than I originally expected :)

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia



More information about the Python-ideas mailing list