<font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-size: 14px; ">Hi,<div>
<br></div><div><span style="font-family: arial, sans-serif; font-size: 14px; border-collapse: collapse; "><div>Is there anyway to specify that I want a block or function to work in different stack frame in python ?</div><div>
I&#39;m thinking about something like this:</div><div><br></div><div>def check_something(magic_stack_frame, blah):</div><div>    if blah &gt; 10</div><div>      return &quot;Error....&quot;</div><div>    else:</div><div>      # do something</div>
<div>    return</div><div><br></div><div><br></div><div>def myf():</div><div>   blah = 20</div><div>   check_something(current_stack_frame, blah)</div><div>   print(&#39;should not be here&#39;)</div><div><br></div><div>In this case, I don&#39;t want to see the message &#39;should not be here&#39;.  The return &quot;Error ....&quot; should be done as if check_something</div>
<div>is in the same stack frame of myf() instead of check_something</div><div><br></div><div>Thanks,</div></span></div></span></span></font><br>-- <br>-Nick Kanakakorn<br>