Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder3.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.030 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'subject:not': 0.03; 'subject:Why': 0.09; 'python': 0.11; 'benjamin': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'itertools': 0.16; 'subject:python': 0.16; 'wrote:': 0.18; 'thu,': 0.19; 'written': 0.21; "aren't": 0.24; 'equivalent': 0.26; 'header :In-Reply-To:1': 0.27; 'point': 0.28; 'function': 0.29; 'message- id:@mail.gmail.com': 0.30; 'code': 0.31; 'usually': 0.31; 'probably': 0.32; 'subject:the': 0.34; "i'd": 0.34; 'but': 0.35; 'received:google.com': 0.35; 'combination': 0.36; 'subject:?': 0.36; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'easy': 0.60; 'most': 0.60; 'more': 0.64; 'oscar': 0.84; 'understand,': 0.84; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=o2MkVbeUYioaoxXB0LB3cSZHxh1fKgr2g32idIVv3CA=; b=SloYykffEJDKAplTBEj+JAKMlabJDHpm5qDURIgTO4IXgc31Iq88fLQi9lqUtIze5J kc8zQJ9wz6dIqGkKrxsa/P0oxmm3TuESn5k5be+3JTWVLdBIJjruDZh1+LmCq4HC7a1M RsHPd//ikBjmQ0AEvRbdjhXmVJTBFOEVZmRLKEZBvr2xavlZINYCSl1Ol9kwxEhc3OxE AyO1rXC4tw8X8p22AQjUzM6Z8jLkVWhFyjjdZus7mHUpTvjiMPRxsiGv+Ajz1j05at/4 3GGGTfqFuyhRv4yu5KsHqvoHXZi/p7WKq9clBZptZEVhIYG37pnRFd4ufbabBwKWwAez iLbQ== MIME-Version: 1.0 X-Received: by 10.52.122.109 with SMTP id lr13mr751188vdb.91.1367499350433; Thu, 02 May 2013 05:55:50 -0700 (PDT) In-Reply-To: References: <5181f679$0$29882$c3e8da3$5496439d@news.astraweb.com> Date: Thu, 2 May 2013 22:55:50 +1000 Subject: Re: Why chunks is not part of the python standard lib? From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 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: 12 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1367499359 news.xs4all.nl 15910 [2001:888:2000:d::a6]:50770 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:44621 On Thu, May 2, 2013 at 10:52 PM, Oscar Benjamin wrote: > They are all easy to write as generator functions but to me the point > of itertools is that you can do things more efficiently than a > generator function. Otherwise code that uses a combination of > itertools primitives is usually harder to understand than an > equivalent generator function so I'd probably avoid using itertools. Aren't most of the itertools primitives written in Python anyway? If your code is harder to understand, just write the generator function! ChrisA