[Steven Bethard] > >Then why document itertools.izip() as it is? The documentation there is > >explicit enough to know that izip(it, it) will work as intended. Should > >we make the documentation there less explicit to discourage people from > >using the izip(it, it) idiom?
[Dave Hansen] > In any case, the solution seems obvious: if you want the guarantee, > use the tool that provides it. True enough :-) FWIW, the itertools documentation style was intended more as a learning device than as a specification. I combined regular documentation, approximately equivalent generator code, examples, and recipes. Hopefully, reading the module docs creates an understanding of what the tools do, how to use them, how to combine them, and how to roll your own to extend the toolset. Another goal was providing code fragments to support scripts needing to run on Py2.2 (itertools were introduced in Py2.3). Raymond -- http://mail.python.org/mailman/listinfo/python-list