Tim Peters writes:
effect, a bunch of docs for arguments need to say, in some words or other, that the args must implement the iterator interface or protocol. I think it's essential that we define the latter only once. But the docs don't really define any interfaces/protocols now, so it's unclear where to put that.
Won't there be at least one standard iterator object defined for lists, etc.? That could be described in the built-in types section (as with files, lists, etc.) of the Library Reference. That will be used as the definition of the iterator protocol in the same way the file object description there is referred to from places that want file or file-like objects. I think we need some re-organization of the built-in types section to separate abstract protocols from specific implementations, but that's an orthagonal aspect and can be handled at the same time as the rest of the built-in types. Specific changes for places that accept iterators should be made as the code is changed, as usual. Please describe the changes clearly in checkin messages so iterator related changes don't propogate to the maintenance branch.