[Python-ideas] except expression

Chris Angelico rosuav at gmail.com
Thu Feb 20 01:03:24 CET 2014


On Thu, Feb 20, 2014 at 10:54 AM, Andrew Barnert <abarnert at yahoo.com> wrote:
> Actually, any purely-functional languages where a function body is always an expression obviously have to do exception handling as an expression. So, a survey may be helpful here.
>
> It's hard to map other languages to Python because most of them either allow statements inside expressions and take the value of the last statement (which must be an expression statement) as the value, or don't really have statements at all. Also, the different function-calling syntaxes can be very confusing. I'll try my best. Wikipedia has a page on exception handling syntax (http://en.wikipedia.org/wiki/Exception_handling_syntax) that gives more details of tons of languages, and I'll try to link each one to a relevant docs or tutorial page.
>

Thanks for that! I can incorporate that directly. As a part of the
PEP, it would be explicitly placed in the public domain, and I or
anyone else who edits the PEP would be allowed to edit the text you've
written. Just for the record, I want to confirm that you're okay with
that :)

ChrisA


More information about the Python-ideas mailing list