diff options
author | Thomas Perl <m@thp.io> | 2019-04-02 09:30:10 (GMT) |
---|---|---|
committer | Inada Naoki <songofacandy@gmail.com> | 2019-04-02 09:30:10 (GMT) |
commit | b8311cf5e5d72f8a8aa688b7da1760d6a74a4d72 (patch) | |
tree | 8b27ad7389e9fb15f38f8b96be1f3f7423f6a8b2 /Misc | |
parent | 04694a306b8f4ab54ef5fc4ba673c26fa53b0ac1 (diff) | |
download | cpython-b8311cf5e5d72f8a8aa688b7da1760d6a74a4d72.zip cpython-b8311cf5e5d72f8a8aa688b7da1760d6a74a4d72.tar.gz cpython-b8311cf5e5d72f8a8aa688b7da1760d6a74a4d72.tar.bz2 |
bpo-36473: add maximum iteration check for dict .values() and .items() (GH-12619)
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/Core and Builtins/2019-03-27-23-53-00.bpo-36452.xhK2lT.rst | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Misc/NEWS.d/next/Core and Builtins/2019-03-27-23-53-00.bpo-36452.xhK2lT.rst b/Misc/NEWS.d/next/Core and Builtins/2019-03-27-23-53-00.bpo-36452.xhK2lT.rst index 37c0c50..26d8568 100644 --- a/Misc/NEWS.d/next/Core and Builtins/2019-03-27-23-53-00.bpo-36452.xhK2lT.rst +++ b/Misc/NEWS.d/next/Core and Builtins/2019-03-27-23-53-00.bpo-36452.xhK2lT.rst @@ -1 +1,5 @@ -Changing `dict` keys during iteration will now be detected in certain corner cases where the number of keys isn't changed (but they keys themselves are), and a `RuntimeError` will be raised.
\ No newline at end of file +Changing ``dict`` keys during iteration of the dict itself, ``keys()``, +``values()``, or ``items()`` will now be detected in certain corner cases where +keys are deleted/added so that the number of keys isn't changed. +A `RuntimeError` will be raised after ``len(dict)`` iterations. +Contributed by Thomas Perl. |