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

Skip to content

[3.8] bpo-40895: Update weakref documentation to remove old warnings (GH-20687) #20792

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 10, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions Doc/library/weakref.rst
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,6 @@ Extension types can easily be made to support weak references; see
application without adding attributes to those objects. This can be especially
useful with objects that override attribute accesses.

.. note::

Caution: Because a :class:`WeakKeyDictionary` is built on top of a Python
dictionary, it must not change size when iterating over it. This can be
difficult to ensure for a :class:`WeakKeyDictionary` because actions
performed by the program during iteration may cause items in the
dictionary to vanish "by magic" (as a side effect of garbage collection).

:class:`WeakKeyDictionary` objects have an additional method that
exposes the internal references directly. The references are not guaranteed to
Expand All @@ -189,13 +182,6 @@ than needed.
Mapping class that references values weakly. Entries in the dictionary will be
discarded when no strong reference to the value exists any more.

.. note::

Caution: Because a :class:`WeakValueDictionary` is built on top of a Python
dictionary, it must not change size when iterating over it. This can be
difficult to ensure for a :class:`WeakValueDictionary` because actions performed
by the program during iteration may cause items in the dictionary to vanish "by
magic" (as a side effect of garbage collection).

:class:`WeakValueDictionary` objects have an additional method that has the
same issues as the :meth:`keyrefs` method of :class:`WeakKeyDictionary`
Expand Down