Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2b00db6 commit b3c92c6Copy full SHA for b3c92c6
1 file changed
Doc/library/weakref.rst
@@ -489,11 +489,14 @@ Unless you set the :attr:`~finalize.atexit` attribute to
489
:const:`False`, a finalizer will be called when the program exits if it
490
is still alive. For instance
491
492
- >>> obj = Object()
493
- >>> weakref.finalize(obj, print, "obj dead or exiting") #doctest:+ELLIPSIS
494
- <finalize object at ...; for 'Object' at ...>
495
- >>> del obj
496
- obj dead or exiting
+.. doctest::
+ :options: +SKIP
+
+ >>> obj = Object()
+ >>> weakref.finalize(obj, print, "obj dead or exiting")
497
+ <finalize object at ...; for 'Object' at ...>
498
+ >>> exit()
499
+ obj dead or exiting
500
501
502
Comparing finalizers with :meth:`__del__` methods
0 commit comments