Preventing python definition from execution
<p>I want to know what is the best way of checking an condition in Python definition and prevent it from further execution if condition is not satisfied. Right now i am following the below mentioned scheme but it actually prints the whole trace stack. I want it to print only an error message and do not execute the rest of code. Is there any other cleaner solution for doing it.</p>

<pre><code>def Mydef(n1,n2):
    if (n1&gt;n2):
        raise ValueError("Arg1 should be less than Arg2)
    # Some Code


Mydef(2,1)
</code></pre>
