]> granicus.if.org Git - python/commitdiff
remove warning about tb circular reference (closes #7340)
authorBenjamin Peterson <benjamin@python.org>
Tue, 15 Jan 2013 21:49:22 +0000 (16:49 -0500)
committerBenjamin Peterson <benjamin@python.org>
Tue, 15 Jan 2013 21:49:22 +0000 (16:49 -0500)
Doc/library/sys.rst

index 93273c45688bc756dd7236176c12e284c07d157d..626443727de3417b10b1441b342cef6eea151594 100644 (file)
@@ -215,21 +215,6 @@ always available.
    a traceback object (see the Reference Manual) which encapsulates the call
    stack at the point where the exception originally occurred.
 
-   .. warning::
-
-      Assigning the *traceback* return value to a local variable in a function
-      that is handling an exception will cause a circular reference.  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 :keyword:`try`
-      ... :keyword:`finally` statement) or to call :func:`exc_info` in a
-      function that does not itself handle an exception.
-
-      Such cycles are normally automatically reclaimed when garbage collection
-      is enabled and they become unreachable, but it remains more efficient to
-      avoid creating cycles.
-
 
 .. data:: exec_prefix