[Baypiggies] running code in different stack frame
Nick S Kanakakorn
bbdada at gmail.com
Thu Oct 7 23:12:14 CEST 2010
Hi,
Is there anyway to specify that I want a block or function to work in
different stack frame in python ?
I'm thinking about something like this:
def check_something(magic_stack_frame, blah):
if blah > 10
return "Error...."
else:
# do something
return
def myf():
blah = 20
check_something(current_stack_frame, blah)
print('should not be here')
In this case, I don't want to see the message 'should not be here'. The
return "Error ...." should be done as if check_something
is in the same stack frame of myf() instead of check_something
Thanks,
--
-Nick Kanakakorn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/baypiggies/attachments/20101007/def847e7/attachment.html>
More information about the Baypiggies
mailing list