Message24278
See the zip documentation:
http://www.python.org/dev/doc/devel/lib/built-in-funcs.html
i. documentation refers to sequences not to iterables
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 possibilities).
The example expresses the solution to an actual need,
so the behavior should be documented or warned against,
I believe. |
|
Date |
User |
Action |
Args |
2007-08-23 14:29:31 | admin | link | issue1121416 messages |
2007-08-23 14:29:31 | admin | create | |
|