Changeset 391 for python/trunk/Lib/test/test_iterlen.py
- Timestamp:
- Mar 19, 2014, 11:31:01 PM (11 years ago)
- Location:
- python/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
python/trunk
-
Property svn:mergeinfo
set to
/python/vendor/Python-2.7.6 merged eligible /python/vendor/current merged eligible
-
Property svn:mergeinfo
set to
-
python/trunk/Lib/test/test_iterlen.py
r2 r391 21 21 Some containers become temporarily immutable during iteration. This includes 22 22 dicts, sets, and collections.deque. Their implementation is equally simple 23 though they need to perman tently set their length to zero whenever there is23 though they need to permanently set their length to zero whenever there is 24 24 an attempt to iterate after a length mutation. 25 25 26 26 The situation slightly more involved whenever an object allows length mutation 27 during iteration. Lists and sequence iterators are dyna namically updatable.27 during iteration. Lists and sequence iterators are dynamically updatable. 28 28 So, if a list is extended during iteration, the iterator will continue through 29 29 the new items. If it shrinks to a point before the most recent iteration,
Note:
See TracChangeset
for help on using the changeset viewer.