[BangPypers] Nested try-catch
bhaskar.jain2002 at gmail.com
Wed Oct 7 05:51:23 CEST 2009
Anand, nice find..
But i read this in python docs -
Assigning the traceback return value to a local variable in a function that
is handling an exception will cause a circular reference. This will prevent
anything referenced by a local variable in the same function or by the
traceback from being garbage collected. Since most functions don’t need
access to the traceback, the best solution is to use something like exctype,
value = sys.exc_info()[:2] to extract only the exception type and value. If
you do need the traceback, make sure to delete it after use (best done with
a try ... finally statement) or to call exc_info() in a function that does
not itself handle an exception."
On Tue, Oct 6, 2009 at 9:47 PM, Noufal Ibrahim <noufal at gmail.com> wrote:
> On Tue, Oct 6, 2009 at 9:24 PM, Anand Chitipothu <anandology at gmail.com>
> > Has anybody else faced similar situation? Any better solutions?
> Can't say I've come across it. However, it looks like (and was
> classified as) a bug which is fixed. :)
> BangPypers mailing list
> BangPypers at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the BangPypers