Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 45687bb

Browse files
committed
Add warning about exceptions in __del__ being ignored.
1 parent 0bbf253 commit 45687bb

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

Doc/ref/ref3.tex

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -634,6 +634,10 @@ \subsection{Special methods for any type}
634634
former decrements the reference count for \code{x} by one, but
635635
\code{x.__del__} is only called when its reference count reaches zero.
636636

637+
\strong{Warning:} due to the precarious circumstances under which
638+
\code{__del__} methods are executed, exceptions that occur during
639+
their execution are \emph{ignored}.
640+
637641
\item[{\tt __repr__(self)}]
638642
Called by the \verb@repr()@ built-in function and by string conversions
639643
(reverse or backward quotes) to compute the string representation of an object.

Doc/ref3.tex

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -634,6 +634,10 @@ \subsection{Special methods for any type}
634634
former decrements the reference count for \code{x} by one, but
635635
\code{x.__del__} is only called when its reference count reaches zero.
636636

637+
\strong{Warning:} due to the precarious circumstances under which
638+
\code{__del__} methods are executed, exceptions that occur during
639+
their execution are \emph{ignored}.
640+
637641
\item[{\tt __repr__(self)}]
638642
Called by the \verb@repr()@ built-in function and by string conversions
639643
(reverse or backward quotes) to compute the string representation of an object.

0 commit comments

Comments
 (0)