`raise` as a function

If you’re at the point where you’re willing to use empty generators to do this, may as well just do:

x = a() or b() or exec('raise Exception')
3 Likes