Following \"Samurai principle\", I\'m trying to do this on my functions but seems it\'s wrong...
return if else raise
Well, you could test for the bool separately:
if expr: raise exception('foo') return val
That way, you could test for expr earlier.
expr