Files
cpython/Lib
Guido van Rossum 59d1d2b434 Iterators phase 1. This comprises:
new slot tp_iter in type object, plus new flag Py_TPFLAGS_HAVE_ITER
new C API PyObject_GetIter(), calls tp_iter
new builtin iter(), with two forms: iter(obj), and iter(function, sentinel)
new internal object types iterobject and calliterobject
new exception StopIteration
new opcodes for "for" loops, GET_ITER and FOR_ITER (also supported by dis.py)
new magic number for .pyc files
new special method for instances: __iter__() returns an iterator
iteration over dictionaries: "for x in dict" iterates over the keys
iteration over files: "for x in file" iterates over lines

TODO:

documentation
test suite
decide whether to use a different way to spell iter(function, sentinal)
decide whether "for key in dict" is a good idea
use iterators in map/filter/reduce, min/max, and elsewhere (in/not in?)
speed tuning (make next() a slot tp_next???)
2001-04-20 19:13:02 +00:00
..
2001-02-09 16:34:24 +00:00
2001-02-18 03:30:53 +00:00
2001-04-08 07:23:44 +00:00
2001-02-09 05:38:46 +00:00
2001-02-10 00:06:00 +00:00
2001-02-18 03:30:53 +00:00
2001-03-19 13:40:44 +00:00
2001-02-09 08:56:30 +00:00
2001-03-16 08:29:48 +00:00
2001-04-20 19:13:02 +00:00
2001-01-20 23:34:12 +00:00
2001-03-02 06:43:49 +00:00
2001-01-20 23:34:12 +00:00
2001-01-20 23:34:12 +00:00
2001-02-09 11:10:16 +00:00
2001-01-20 23:34:12 +00:00
2001-01-20 23:34:12 +00:00
2001-01-23 15:35:05 +00:00
2001-01-20 23:34:12 +00:00
2001-02-09 10:10:02 +00:00
2001-02-09 08:25:29 +00:00
2001-02-09 10:18:37 +00:00
2001-01-24 06:27:27 +00:00
2001-04-13 14:04:02 +00:00
2001-02-09 09:10:35 +00:00
2001-02-09 09:48:45 +00:00
2001-01-24 06:27:27 +00:00
2001-01-24 06:27:27 +00:00
2001-02-09 09:48:45 +00:00
2001-02-09 10:23:55 +00:00
2001-02-10 00:22:33 +00:00
2001-02-09 09:39:08 +00:00
2001-04-10 15:42:02 +00:00
2001-02-18 03:30:53 +00:00
2001-02-09 07:02:17 +00:00
2001-02-06 01:07:02 +00:00
2001-02-07 23:14:30 +00:00
2001-02-09 20:06:00 +00:00
2001-02-12 02:00:42 +00:00
2001-02-12 02:00:42 +00:00
2001-02-12 02:00:42 +00:00
2001-02-12 02:00:42 +00:00
2001-02-12 02:00:42 +00:00
2001-02-18 03:30:53 +00:00
2001-02-15 23:56:39 +00:00
2001-02-15 22:15:14 +00:00
2001-02-15 22:15:14 +00:00
2001-02-15 22:15:14 +00:00
2001-02-15 22:15:14 +00:00
2001-02-15 22:15:14 +00:00
2001-02-15 22:15:14 +00:00
2001-02-15 22:15:14 +00:00
2001-02-15 23:56:39 +00:00
2001-02-15 22:15:14 +00:00
2001-02-15 22:15:14 +00:00
2001-02-15 22:15:14 +00:00
2001-02-15 22:15:14 +00:00
2001-02-15 22:15:14 +00:00
2001-03-29 04:36:09 +00:00
2001-03-22 15:50:10 +00:00
2001-03-22 15:50:10 +00:00
2001-03-22 15:50:10 +00:00
2001-03-22 15:50:10 +00:00
2001-02-18 03:30:53 +00:00
2001-02-15 22:15:14 +00:00
2001-02-18 03:30:53 +00:00
2001-01-15 01:36:40 +00:00
2001-01-15 01:36:40 +00:00
2000-08-24 21:08:39 +00:00
2001-02-10 00:22:33 +00:00
2001-03-29 04:36:09 +00:00
2000-03-10 23:18:11 +00:00
2001-03-16 08:29:48 +00:00