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

2005-11-23 Thread rhettinger
> > 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 > > tool

Python as Guido Intended

2005-11-23 Thread rhettinger
[EMAIL PROTECTED] wrote: > it seems that quite some people > don't see the language as the creator or wants them to see it. Here's my two cents on this recurring theme. While nothing forces a particular programming style, there is some merit to swimming with the current rather than against it. O

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

2005-11-23 Thread rhettinger
[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 an

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

2005-11-22 Thread rhettinger
> > ii. The other problem is easier to explain by example. > > Let it=iter([1,2,3,4]). > > What is the result of zip(*[it]*2)? > > The current answer is: [(1,2),(3,4)], > > but it is impossible to determine this from the docs, > > which would allow [(1,3),(2,4)] instead (or indeed > > other