[Python-ideas] Make "raise" an expression

Chris Angelico rosuav at gmail.com
Sat Aug 6 19:29:51 EDT 2016


On Sun, Aug 7, 2016 at 9:24 AM, אלעזר <elazarg at gmail.com> wrote:
> To be honest, I'm not sure that this change is worthwhile. Admittedly the
> use cases are weak, and in some ways this is complementary of the (sadly
> rejected) "except expression". I would still like to "finish that thought",
> so - why not?
>

More "why". Python doesn't emphasize one-liners, so there needs to be
a good reason not to just make this an 'if' statement. The use cases
given are indeed weak, but given stronger ones, I'm sure this could be
done.

ChrisA


More information about the Python-ideas mailing list