From 60192346df93e5efcdbfb53fa287a963f558c3f6 Mon Sep 17 00:00:00 2001 From: lumbric Date: Fri, 30 Nov 2018 16:47:52 +0100 Subject: [PATCH] Fix wrong docstring for unzip() The current version of unzip() works only if the inner sequence is finite, but in Python 3 zip() can be used. See also comment in #239. --- toolz/sandbox/core.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/toolz/sandbox/core.py b/toolz/sandbox/core.py index 359fc3fa..915f06c2 100644 --- a/toolz/sandbox/core.py +++ b/toolz/sandbox/core.py @@ -105,7 +105,7 @@ def unzip(seq): [1, 2] Unlike the naive implementation ``def unzip(seq): zip(*seq)`` this - implementation can handle a finite sequence of infinite sequences. + implementation can handle an infinite sequence ``seq``. Caveats: @@ -113,7 +113,8 @@ def unzip(seq): of auxiliary storage if the resulting iterators are consumed at different times. - * The top level sequence cannot be infinite. + * The inner sequence cannot be infinite. In Python 3 ``zip(*seq)`` can be + used if ``seq`` is a finite sequence of infinite sequences. """