summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-05-17 08:24:29 (GMT)
committerGeorg Brandl <georg@python.org>2009-05-17 08:24:29 (GMT)
commit4c8b1c7a590f42511324a8860d5f5eb79c5ac716 (patch)
tree1ab4cd7c5cec0e86cef5d6c7ba0cbd6df5e49e40
parent5e88eea994804b700ca71c432af08a525f85cbf2 (diff)
downloadcpython-4c8b1c7a590f42511324a8860d5f5eb79c5ac716.zip
cpython-4c8b1c7a590f42511324a8860d5f5eb79c5ac716.tar.gz
cpython-4c8b1c7a590f42511324a8860d5f5eb79c5ac716.tar.bz2
#6017: better document behavior of dictiterators when the dict is changed.
-rw-r--r--Doc/library/stdtypes.rst7
1 files changed, 4 insertions, 3 deletions
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index ae3856c..35c7817 100644
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -1986,7 +1986,7 @@ pairs within braces, for example: ``{'jack': 4098, 'sjoerd': 4127}`` or ``{4098:
note for :meth:`dict.items`.
Using :meth:`iteritems` while adding or deleting entries in the dictionary
- will raise a :exc:`RuntimeError`.
+ may raise a :exc:`RuntimeError` or fail to iterate over all entries.
.. versionadded:: 2.2
@@ -1996,7 +1996,7 @@ pairs within braces, for example: ``{'jack': 4098, 'sjoerd': 4127}`` or ``{4098:
:meth:`dict.items`.
Using :meth:`iterkeys` while adding or deleting entries in the dictionary
- will raise a :exc:`RuntimeError`.
+ may raise a :exc:`RuntimeError` or fail to iterate over all entries.
.. versionadded:: 2.2
@@ -2006,7 +2006,8 @@ pairs within braces, for example: ``{'jack': 4098, 'sjoerd': 4127}`` or ``{4098:
:meth:`dict.items`.
Using :meth:`itervalues` while adding or deleting entries in the
- dictionary will raise a :exc:`RuntimeError`.
+ dictionary may raise a :exc:`RuntimeError` or fail to iterate over all
+ entries.
.. versionadded:: 2.2