[docs] code-example doesn't work as displayed in documentation

Sandro Tosi sandro.tosi at gmail.com
Sun Aug 12 10:26:17 CEST 2012


Hello Martin,

On Thu, Aug 2, 2012 at 8:11 AM, Martin <mpc4 at gmx.com> wrote:
>>>> zip(*matrix)
> <zip object at 0x7fd9d8a660e0>
>
> to make it work like displayed i had to type:
>
>>>> list(zip(*matrix))
> [(1, 5, 9), (2, 6, 10), (3, 7, 11), (4, 8, 12)]

zip() in Python 3.x returns an iterator, so we need to make a list
from it - I've just fixed for python 3.2 and 3.3

Regards,
-- 
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi


More information about the docs mailing list