Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #84643
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <kwpolska@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.108 |
| X-Spam-Level | * |
| X-Spam-Evidence | '*H*': 0.79; '*S*': 0.01; 'elegant': 0.07; 'cc:addr :python-list': 0.11; 'jan': 0.12; 'galaxy': 0.16; 'wrote:': 0.18; 'email addr:gmail.com>': 0.22; 'cc:addr:python.org': 0.22; 'this?': 0.23; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; '>': 0.26; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'message-id:@mail.gmail.com': 0.30; 'received:google.com': 0.35; 'there': 0.35; 'subject:?': 0.36; 'pm,': 0.38; 'skip:\xc2 10': 0.60; 'subject:more': 0.64; 'more': 0.64; 'to:addr:gmail.com': 0.65; 'subject:there': 0.68; '8bit%:100': 0.72; 'subject:this': 0.83; '2015': 0.84 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=kGPsf7ZDl59YbMn6UvnTU14WeYIE8yw/xy4wK5zg9Vw=; b=kNfcIMOHV6FNuB7WJ3f79twmBwzzF3J5oJFyoCHXUV4F1akB5e1buAASy5zg6lo9v6 UFqHtvwsQnHnWAEvoqSPjZwRlzdNknwiSmfJrooOk4glxn0r9kwGevZ6wQrqvrGliQRu 2hsZX/eH+8Rkm9jXB7wInvYAFWZCeeG6w04sxD6paDkAXvJsqHN4wsrHDk8RkpujrMhR z4M+DpTOk7/FPv4ChpynYHJibDabmBeiBAdA4U8xTmuLocPmLgvTVQHNkg0gZXXeO2oD aue9oBQ99KikVo1QSrawM6Is6q8tw4HbEpXEBkkQMgqo2KgfOGfBmqlpxzGpn53cYtsO r1DA== |
| MIME-Version | 1.0 |
| X-Received | by 10.112.85.11 with SMTP id d11mr1579668lbz.100.1422364810054; Tue, 27 Jan 2015 05:20:10 -0800 (PST) |
| In-Reply-To | <ma8311$q4c$1@ger.gmane.org> |
| References | <ma8311$q4c$1@ger.gmane.org> |
| Date | Tue, 27 Jan 2015 14:20:10 +0100 |
| Subject | Re: Is there a more elegant way to spell this? |
| From | Chris Warrick <kwpolska@gmail.com> |
| To | Neal Becker <ndbecker2@gmail.com> |
| Content-Type | multipart/alternative; boundary=001a11345ed63e9242050da21d56 |
| Cc | python-list@python.org |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.18171.1422364818.18130.python-list@python.org> (permalink) |
| Lines | 36 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1422364818 news.xs4all.nl 2833 [2001:888:2000:d::a6]:42253 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:84643 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
On Jan 27, 2015 2:16 PM, "Neal Becker" <ndbecker2@gmail.com> wrote:
>
> Is there a more elegant way to spell this?
>
> for x in [_ for _ in seq if some_predicate]:
for x in seq:
if some_predicate:
do_something_to(x)
--
Chris Warrick <https://chriswarrick.com/>
Sent from my Galaxy S3.
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Re: Is there a more elegant way to spell this? Chris Warrick <kwpolska@gmail.com> - 2015-01-27 14:20 +0100
Re: Is there a more elegant way to spell this? Rob Gaddi <rgaddi@technologyhighland.invalid> - 2015-01-27 09:49 -0800
Re: Is there a more elegant way to spell this? Emile van Sebille <emile@fenx.com> - 2015-01-27 10:27 -0800
csiph-web