<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-5440028356946346379.post8122458365340665425..comments</id><updated>2009-11-15T12:34:25.530-05:00</updated><title type='text'>Comments on Doug Hellmann: PyMOTW: sys, Part 4: Exception Handling</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.doughellmann.com/feeds/8122458365340665425/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5440028356946346379/8122458365340665425/comments/default'/><link rel='alternate' type='text/html' href='http://blog.doughellmann.com/2009/11/pymotw-sys-part-4-exception-handling.html'/><author><name>Doug Hellmann</name><uri>http://www.blogger.com/profile/01892352754222143463</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>2</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5440028356946346379.post-1998468940767705586</id><published>2009-11-15T12:34:25.722-05:00</published><updated>2009-11-15T12:34:25.722-05:00</updated><title type='text'>@Anon - Python's memory manager is a garbage colle...</title><content type='html'>@Anon - Python&amp;#39;s memory manager is a garbage collector that works by tracking the number of references to an object (&amp;quot;reference counting&amp;quot;).  When objects have no more external references (nothing uses them), they become candidates to be deleted to regain memory.  If two or more objects form a reference cycle (A-&amp;gt;B-&amp;gt;C-&amp;gt;A) then none of the objects will ever have 0 references and they will not be deleted.&lt;br /&gt;&lt;br /&gt;In this specific case, the frame active in the exception handler would form a circular reference with the traceback, and so neither would ever be deleted.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5440028356946346379/8122458365340665425/comments/default/1998468940767705586'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5440028356946346379/8122458365340665425/comments/default/1998468940767705586'/><link rel='alternate' type='text/html' href='http://blog.doughellmann.com/2009/11/pymotw-sys-part-4-exception-handling.html?showComment=1258306465722#c1998468940767705586' title=''/><author><name>Doug Hellmann</name><uri>http://www.blogger.com/profile/01892352754222143463</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00116818175230541568'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.doughellmann.com/2009/11/pymotw-sys-part-4-exception-handling.html' ref='tag:blogger.com,1999:blog-5440028356946346379.post-8122458365340665425' source='http://www.blogger.com/feeds/5440028356946346379/posts/default/8122458365340665425' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-5440028356946346379.post-8686097515822449345</id><published>2009-11-09T02:46:58.257-05:00</published><updated>2009-11-09T02:46:58.257-05:00</updated><title type='text'>This example avoids introducing a circular referen...</title><content type='html'>&lt;i&gt;This example avoids introducing a circular reference between the traceback and a local variable in the current frame by ignoring that part of the return value from exc_info(). If you do need the traceback for some reason (such as to log it), you should explicitly delete the local variable when you’re done (using del) to avoid cycles.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Can you please explain this in more detail ? I am a relatively new. Thanks.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5440028356946346379/8122458365340665425/comments/default/8686097515822449345'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5440028356946346379/8122458365340665425/comments/default/8686097515822449345'/><link rel='alternate' type='text/html' href='http://blog.doughellmann.com/2009/11/pymotw-sys-part-4-exception-handling.html?showComment=1257752818257#c8686097515822449345' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.doughellmann.com/2009/11/pymotw-sys-part-4-exception-handling.html' ref='tag:blogger.com,1999:blog-5440028356946346379.post-8122458365340665425' source='http://www.blogger.com/feeds/5440028356946346379/posts/default/8122458365340665425' type='text/html'/></entry></feed>