how to stop a function execution like...

Gaudha sanal.vikram at
Tue Jun 16 07:30:02 EDT 2009

Is there any built-in function to stop execution of a function similar
to stop the program execution by sys.exit?
In the example below, I want to skip statement 2... if the 'if'
condition is satisfied.
Don't advice me to put statement 2 in 'else' block. That's not my
May be this a simple task. Sorry to say I'm novice in Python,

def funct :
    if (.....) : statement 1
    statement 2

More information about the Python-list mailing list