[Python-ideas] Infix functions

Chris Angelico rosuav at gmail.com
Tue Feb 25 03:18:11 CET 2014


On Tue, Feb 25, 2014 at 12:47 PM, Steven D'Aprano <steve at pearwood.info> wrote:
>     it might be handy to raise an exception from inside an
>     expression, but I don't see that this maps to your proposal;

It's easy enough to write, anyway.

def throw(x):
    raise x

I've used that in a few syntactic demos, but never in production code.

ChrisA


More information about the Python-ideas mailing list