[Python-Dev] Re: Single- vs. Multi-pass iterability
Guido van Rossum
guido@python.org
Fri, 19 Jul 2002 14:15:45 -0400
> The way I read these, the behavior of an implementation of these
> functions isn't really open-ended. It ought to follow certain
> conventions, if you want your type to behave sensibly. And that's
> about as strong as any legislation I've seen anywhere in the Python
> docs.
Note the qualification: "if you want your type to behave sensibly".
You can interpret the paragraphs you quoted as explaining what makes a
good sequence or mapping. IOW they hint at some of the invariants of
those protocols. But I wouldn't call this legislation.
> Of course I do; I never expected otherwise. Like most of my other
> suggestions, this is a case of "OK, whatever you say Guido... but as
> long as people are interested in discussing the issues I'd like them
> to understand my reasons for bringing it up".
Maybe I should just tune out of this discussion if it's only of
theoretical importance?
--Guido van Rossum (home page: http://www.python.org/~guido/)