diff options
| author | Ezio Melotti <ezio.melotti@gmail.com> | 2011-03-16 09:38:59 (GMT) |
|---|---|---|
| committer | Ezio Melotti <ezio.melotti@gmail.com> | 2011-03-16 09:38:59 (GMT) |
| commit | b88ed1549e76fadf161227d15cc307f0e8b94c59 (patch) | |
| tree | 7fea10f9a15064480554f093da39f361df463c61 /Lib/test/test_iterlen.py | |
| parent | c8a03349d174379f051ab93d02a2918a15269e00 (diff) | |
| parent | 3b3499ba69341a49fc842ce0d4a2f66fcb249a04 (diff) | |
| download | cpython-b88ed1549e76fadf161227d15cc307f0e8b94c59.zip cpython-b88ed1549e76fadf161227d15cc307f0e8b94c59.tar.gz cpython-b88ed1549e76fadf161227d15cc307f0e8b94c59.tar.bz2 | |
#11565: Merge with 3.2.
Diffstat (limited to 'Lib/test/test_iterlen.py')
| -rw-r--r-- | Lib/test/test_iterlen.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_iterlen.py b/Lib/test/test_iterlen.py index cd92801..7469a31 100644 --- a/Lib/test/test_iterlen.py +++ b/Lib/test/test_iterlen.py @@ -20,11 +20,11 @@ This is the case for tuples, range objects, and itertools.repeat(). Some containers become temporarily immutable during iteration. This includes dicts, sets, and collections.deque. Their implementation is equally simple -though they need to permantently set their length to zero whenever there is +though they need to permanently set their length to zero whenever there is an attempt to iterate after a length mutation. The situation slightly more involved whenever an object allows length mutation -during iteration. Lists and sequence iterators are dynanamically updatable. +during iteration. Lists and sequence iterators are dynamically updatable. So, if a list is extended during iteration, the iterator will continue through the new items. If it shrinks to a point before the most recent iteration, then no further items are available and the length is reported at zero. |
