Jakub Stasiak added the comment: I'm just gonna leave my implementation of chunk function (not sure about the name yet) here, it's basically what itertools.chunks from the previous patch is but it works for arbitrary iterables + few tests and documentation. The last chunk is currently truncated if there are not enough elements to fill it completely.
---------- nosy: +jstasiak Added file: http://bugs.python.org/file31565/itertools.chunk.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17862> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com