defining the behavior of zip(it, it) (WAS: Converting a flat list...)

rhettinger at gmail.com rhettinger at gmail.com
Wed Nov 23 19:42:48 CET 2005


> > 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.

[Fredrik Lundh]
> maybe it's time to change "equivalent to" to "similar to", to avoid
> messing things up for people who reads the mostly informal library
> reference as if it were an ISO specification.

Will do.

This is doubly a good idea because there are small differences in
argument processing.  For example, count() makes an immediate check for
a numerical argument but the generator version won't recognize the
fault until the count(x).next() is called.




More information about the Python-list mailing list