Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!eweka.nl!hq-usenetpeers.eweka.nl!xlned.com!feeder1.xlned.com!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'example:': 0.03; 'subject:not': 0.03; 'sized': 0.07; 'subject:Why': 0.09; '3],': 0.16; '8bit%:1': 0.16; 'chunks': 0.16; 'iterator': 0.16; 'skip:n 70': 0.16; 'skip:n 90': 0.16; 'url:312443': 0.16; 'url:djangoproject': 0.16; 'url:how-do-you-split-a-list-into- evenly-sized-chunks-in-python': 0.16; 'subject:python': 0.16; 'split': 0.19; 'skip:n 60': 0.24; 'post': 0.26; 'function': 0.29; 'url:code': 0.29; "doesn't": 0.30; 'message-id:@mail.gmail.com': 0.30; '8bit%:2': 0.31; 'equivalent.': 0.31; 'url:python': 0.33; 'subject:the': 0.34; 'received:google.com': 0.35; 'subject:?': 0.36; 'url:org': 0.36; 'should': 0.36; 'list': 0.37; '8bit%:4': 0.38; 'url:library': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'how': 0.40; 'kind': 0.63; 'behavior': 0.77; 'url:ticket': 0.84; 'mistakes': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type; bh=I8n8VEcvj9Zqla3a6tgruhOcizUTybrCJdjtFb4Emhc=; b=S/yZN6kZodg5Uz9FZdB3YedHtrb474vvV0rHRaSjTX1Kth2lwWDpcbNvFn6fDyIv2v gAjblL2e1oU7utD32vrPXlmtEQKhEaPAvlZchMxnK5Eb9ubGwxPg/Xi+jyxON297LB7l xZDbdrA0mSC3EMyrhqCg12svHHCh3fZHiWZS5HeFfvVDYGyoWkgEJdsZnD/PWXiOQO7O WNzIqiAQz8lX9kLwrFyMkluAXAq3/5ymxxbydJcn0Cya+QVHWKRfu1qxDy+hj9nU25ui an71fsnSJTpa4Aa90nrVIBKA4UkaZzfVqkdizG0WF2hrb7m3tTvNlIxI0H9MOr0KcpWF JL3A== MIME-Version: 1.0 X-Received: by 10.52.228.129 with SMTP id si1mr422178vdc.79.1367389566204; Tue, 30 Apr 2013 23:26:06 -0700 (PDT) Date: Wed, 1 May 2013 01:26:06 -0500 Subject: Why chunks is not part of the python standard lib? From: Ricardo Azpeitia Pimentel To: python-list@python.org Content-Type: multipart/alternative; boundary=089e01183fc45d91b304dba231ee X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 135 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1367389575 news.xs4all.nl 15948 [2001:888:2000:d::a6]:48885 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:44579 --089e01183fc45d91b304dba231ee Content-Type: text/plain; charset=ISO-8859-1 After reading How do you split a list into evenly sized chunks in Python? and seeing this kind of mistakes happening https://code.djangoproject.com/ticket/18972 all the time. Why is not a chunks function in itertools? grouper from http://docs.python.org/2/library/itertools.html#recipes doesn't have the same behavior as chunks Example: chunks([1, 2, 3, 4, 5], 3)# Should return [[1, 2, 3], [4, 5]] or the iterator equivalent. Original Post on StackOverflow: http://stackoverflow.com/questions/16313008/why-chunks-is-not-part-of-the-python-standard-lib --089e01183fc45d91b304dba231ee Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
After reading=A0How do = you split a list into evenly sized chunks in Python?=A0and seeing this kind of mistak= es=A0happening=A0https://code.djangoproject.com/ticket/18972=A0all the t= ime.
Why is not a=A0chunks=A0function in itertools?

grouper=A0from=A0http://docs.python.org/2/library/itertools.h= tml#recipes=A0doesn't have the same behavior as=A0chunks=A0
Example:
ch=
unks([1, 2, 3, 4, 5], 3)<=
span class=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-align:b=
aseline;background-color:transparent">
# Should return [[=
1, 2, 3], [4, 5]] or the iterator equivalent.
Original Post on StackOverflow:=A0http://stackoverflow.com/questions/16313008/why-c= hunks-is-not-part-of-the-python-standard-lib
--089e01183fc45d91b304dba231ee--