[Python-3000] Builtin iterator type

Greg Ewing greg.ewing at canterbury.ac.nz
Wed Nov 15 03:35:26 CET 2006


BJörn Lindqvist wrote:

> But why is both the dict and list protocol so fat then?

Because there are a variety of things you need to
be able to do to sequences and mappings, and the
implementations of them are closely tied to the
internals of the type concerned.

If there were a substantial number of commonly
used operations on them that could be implemented
efficiently in a generic way, then we probably
would have listtools and dicttools modules
(or more properly sequencetools and mappingtools).
That doesn't seem to have happened, though.

--
Greg


More information about the Python-3000 mailing list