From: Georg Brandl Date: Sun, 17 May 2009 08:24:29 +0000 (+0000) Subject: #6017: better document behavior of dictiterators when the dict is changed. X-Git-Tag: v2.7a1~1168 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4c8b1c7a590f42511324a8860d5f5eb79c5ac716;p=thirdparty%2FPython%2Fcpython.git #6017: better document behavior of dictiterators when the dict is changed. --- diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index ae3856ce8e0c..35c78178ba61 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