"or die()" in Python

Viewed 107229

Is anyone using anything like this in Python:

def die(error_message):
    raise Exception(error_message)

...

check_something() or die('Incorrect data')

I think this kind of style is used in PHP and Perl.

Do you find any (dis)advantages in this [style]?

6 Answers
Related