Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #13190

Re: Idioms combining 'next(items)' and 'for item in items:'

References (1 earlier) <CALwzidkeRA69p+Vw80xnE_sndx64zr2yXQsFZhS520KYbjxTxA@mail.gmail.com> <j4iomc$te4$1@dough.gmane.org> <CAPTjJmrXNjoccWAjwPO7yGHjQsruvJ7Kn6WWum6ywwWd+GZpoQ@mail.gmail.com> <j4jknm$cpd$1@dough.gmane.org> <CALwzidnPj4rLpyk3NvogZshQd8y2rJnKrii47-5_N8FNBKf8Hg@mail.gmail.com>
From Ian Kelly <ian.g.kelly@gmail.com>
Date 2011-09-12 10:58 -0600
Subject Re: Idioms combining 'next(items)' and 'for item in items:'
Newsgroups comp.lang.python
Message-ID <mailman.1041.1315847141.27778.python-list@python.org> (permalink)

Show all headers | View raw


On Mon, Sep 12, 2011 at 10:55 AM, Ian Kelly <ian.g.kelly@gmail.com> wrote:
> But you can't write the function under the assumption that it will
> only be called from the function body.  The following is a slight
> reorganization of your example that does exhibit the problem:

s/function body/for-loop body/

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Idioms combining 'next(items)' and 'for item in items:' Ian Kelly <ian.g.kelly@gmail.com> - 2011-09-12 10:58 -0600

csiph-web