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


Groups > comp.lang.python > #47689

Re: Split a list into two parts based on a filter?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder1.xlned.com!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <fabiosantosart@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.003
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'syntax': 0.04; 'subject:two': 0.07; 'english,': 0.09; 'subject:into': 0.09; 'translate': 0.10; 'cc:addr:python-list': 0.11; 'python': 0.11; '&gt;&gt;': 0.16; '10:05': 0.16; 'believes': 0.16; 'brackets': 0.16; 'delimit': 0.16; 'expression.': 0.16; 'fabio': 0.16; 'iterating': 0.16; 'program...': 0.16; 'subject:based': 0.16; 'ternary': 0.16; ':-)': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'example': 0.22; 'email addr:gmail.com&gt;': 0.22; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; '&gt;': 0.26; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; "doesn't": 0.30; 'subject:list': 0.30; 'message- id:@mail.gmail.com': 0.30; 'url:mailman': 0.30; 'code': 0.31; 'comments': 0.31; 'though.': 0.31; 'another': 0.32; 'url:python': 0.33; 'case,': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'c++': 0.36; 'url:listinfo': 0.36; "didn't": 0.36; "i'll": 0.36; 'subject:?': 0.36; 'url:org': 0.36; 'too': 0.37; 'list': 0.37; 'skip:& 10': 0.38; 'process,': 0.38; 'pm,': 0.38; 'explain': 0.39; '12,': 0.39; 'aside': 0.39; 'generating': 0.39; 'url:mail': 0.40; 'skip:u 10': 0.60; 'course': 0.61; 'to:addr:gmail.com': 0.65; 'square': 0.74; 'obvious.': 0.84; 'rusi': 0.91; '2013': 0.98
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=SMPgsd5bOkgTlhFa3iyP7ie7fTcGhSxNBuJMo5O1psE=; b=mTYXjlpCf1Ud1l1biPgPyRRLnLa1hqXFswIsLM564SElUPSmHypztvimOYV61qB6x3 NwqD+V2wAHxHCBmpwc74cbZqWn7dE3uBxjG0kQK8hm85W9w9FHk5qlKhoN04acBJ04dF xhgBw4feQYw8yxUGUA6IgD4HoPdCZbLceIumXb2JOylxzPOfOwZ8JeR6mGbMIqXEOBI/ j0q8I+L7K93lGuBpkxreBYFvl9qzSjxj2soCtVt2SWAFdWzJUlSe9+XRffimHgH8MvX2 Ntp4oORGprGAq8d9RXiLDTQ6NU0UJJLOww7wjDyCFd+HlPgVvU7vaEdptOVgx5FlHo9a VHvA==
MIME-Version 1.0
X-Received by 10.224.106.195 with SMTP id y3mr18152445qao.35.1370973935306; Tue, 11 Jun 2013 11:05:35 -0700 (PDT)
In-Reply-To <CAPTjJmq+xuatszjNJctjQkLcFh1BfQzabSvWr4SFqsUPytEdCQ@mail.gmail.com>
References <kp5d9e$2hf$1@panix2.panix.com> <kp5l7h$2rp$1@ger.gmane.org> <CAA=1kxRWvN8rqTZ+HQb1y5jzWgL0gAu+GBqU8b=XYsQT4pGg2g@mail.gmail.com> <kp6gu4$q4r$1@ger.gmane.org> <mailman.3020.1370958503.3114.python-list@python.org> <37e02d07-a058-48a2-9aad-80613f2df636@a15g2000pbu.googlegroups.com> <mailman.3029.1370970319.3114.python-list@python.org> <dc8034a8-e4f2-4f29-9ebc-69a527edea05@d8g2000pbe.googlegroups.com> <CAPTjJmq+xuatszjNJctjQkLcFh1BfQzabSvWr4SFqsUPytEdCQ@mail.gmail.com>
Date Tue, 11 Jun 2013 19:05:35 +0100
Subject Re: Split a list into two parts based on a filter?
From Fábio Santos <fabiosantosart@gmail.com>
To Chris Angelico <rosuav@gmail.com>
Content-Type multipart/alternative; boundary=20cf3074b33a69962b04dee4becd
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 <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3035.1370973938.3114.python-list@python.org> (permalink)
Lines 96
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1370973938 news.xs4all.nl 15881 [2001:888:2000:d::a6]:41359
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:47689

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

On 11 Jun 2013 18:48, "Chris Angelico" <rosuav@gmail.com> wrote:
>
> On Wed, Jun 12, 2013 at 3:23 AM, rusi <rustompmody@gmail.com> wrote:
> > On Jun 11, 10:05 pm, Fábio Santos <fabiosantos...@gmail.com> wrote:
> >> On 11 Jun 2013 17:47, "rusi" <rustompm...@gmail.com> wrote:
> >>
> >> > [Of course I would prefer a 3-liner where the body of the for is
> >> > indented :-) ]
> >>
> >> Is this an aside comprehension?
> >
> > Eh?
>
> I know they always say "don't explain the joke", but I'll have a shot
> at it. It's somewhat like an autopsy though - you find out why it
> ticks, but in the process, you prove that it's no longer ticking...
>
> An aside comprehension is a means of generating an aside in-line, as
> an expression. In this case, Fabio believes that you were iterating
> over the smiley to generate comments about three-liners, and the
> square brackets delimit the comprehension just as they do in a list
> comprehension.
>
> It's another case of code syntax cropping up in English, like this
> example of ternary punctuation from a C++ program...
>
> //TODO?: blah blah blah
>
> That doesn't translate too well into Python though.
>
> ChrisA
> --
> http://mail.python.org/mailman/listinfo/python-list

That was the joke. Unfortunately I didn't have a better synonym for "aside"
so it wasn't so obvious.

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


Thread

Split a list into two parts based on a filter? roy@panix.com (Roy Smith) - 2013-06-10 16:34 -0400
  Re: Split a list into two parts based on a filter? Chris Angelico <rosuav@gmail.com> - 2013-06-11 08:50 +1000
  Re: Split a list into two parts based on a filter? Roel Schroeven <roel@roelschroeven.net> - 2013-06-11 00:50 +0200
    Re: Split a list into two parts based on a filter? Roy Smith <roy@panix.com> - 2013-06-11 00:11 -0400
      Re: Split a list into two parts based on a filter? Serhiy Storchaka <storchaka@gmail.com> - 2013-06-11 18:27 +0300
        Re: Split a list into two parts based on a filter? Roy Smith <roy@panix.com> - 2013-06-11 20:33 -0400
          Re: Split a list into two parts based on a filter? Phil Connell <pconnell@gmail.com> - 2013-06-12 07:32 +0100
            Re: Split a list into two parts based on a filter? Roy Smith <roy@panix.com> - 2013-06-12 07:39 -0400
              Re: Split a list into two parts based on a filter? Fábio Santos <fabiosantosart@gmail.com> - 2013-06-12 12:51 +0100
              Re: Split a list into two parts based on a filter? Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2013-06-12 15:06 +0300
              Re: Split a list into two parts based on a filter? Terry Reedy <tjreedy@udel.edu> - 2013-06-12 14:07 -0400
          Re: Split a list into two parts based on a filter? Serhiy Storchaka <storchaka@gmail.com> - 2013-06-12 19:28 +0300
          Re: Split a list into two parts based on a filter? Fábio Santos <fabiosantosart@gmail.com> - 2013-06-12 17:57 +0100
          Re: Split a list into two parts based on a filter? Terry Reedy <tjreedy@udel.edu> - 2013-06-12 14:47 -0400
          Re: Split a list into two parts based on a filter? Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2013-06-13 10:43 +0100
  Re: Split a list into two parts based on a filter? Chris Rebert <clp2@rebertia.com> - 2013-06-10 16:03 -0700
  Re: Split a list into two parts based on a filter? Tim Chase <python.list@tim.thechases.com> - 2013-06-10 18:10 -0500
  Re: Split a list into two parts based on a filter? Fábio Santos <fabiosantosart@gmail.com> - 2013-06-11 00:08 +0100
    Re: Split a list into two parts based on a filter? alex23 <wuwei23@gmail.com> - 2013-06-11 17:44 -0700
  Re: Split a list into two parts based on a filter? Chris Angelico <rosuav@gmail.com> - 2013-06-11 09:12 +1000
  Re: Split a list into two parts based on a filter? Peter Otten <__peter__@web.de> - 2013-06-11 02:11 +0200
  Re: Split a list into two parts based on a filter? Peter Otten <__peter__@web.de> - 2013-06-11 08:43 +0200
  Re: Split a list into two parts based on a filter? Jonas Geiregat <jonas@geiregat.org> - 2013-06-11 08:47 +0200
  Re: Split a list into two parts based on a filter? Fábio Santos <fabiosantosart@gmail.com> - 2013-06-11 14:48 +0100
    Re: Split a list into two parts based on a filter? rusi <rustompmody@gmail.com> - 2013-06-11 09:37 -0700
      Re: Split a list into two parts based on a filter? Fábio Santos <fabiosantosart@gmail.com> - 2013-06-11 18:05 +0100
        Re: Split a list into two parts based on a filter? rusi <rustompmody@gmail.com> - 2013-06-11 10:23 -0700
          Re: Split a list into two parts based on a filter? Chris Angelico <rosuav@gmail.com> - 2013-06-12 03:37 +1000
            Re: Split a list into two parts based on a filter? rusi <rustompmody@gmail.com> - 2013-06-11 11:13 -0700
          Re: Split a list into two parts based on a filter? Fábio Santos <fabiosantosart@gmail.com> - 2013-06-11 19:05 +0100
  Re: Split a list into two parts based on a filter? Joshua Landau <joshua.landau.ws@gmail.com> - 2013-06-11 15:22 +0100
  Re: Split a list into two parts based on a filter? Serhiy Storchaka <storchaka@gmail.com> - 2013-06-11 18:28 +0300
  Re: Split a list into two parts based on a filter? Chris Angelico <rosuav@gmail.com> - 2013-06-12 03:28 +1000
    Re: Split a list into two parts based on a filter? Roy Smith <roy@panix.com> - 2013-06-11 20:12 -0400
  Re: Split a list into two parts based on a filter? Peter Otten <__peter__@web.de> - 2013-06-11 20:13 +0200
  Re: Split a list into two parts based on a filter? Peter Otten <__peter__@web.de> - 2013-06-11 20:18 +0200
  Re: Split a list into two parts based on a filter? Chris Angelico <rosuav@gmail.com> - 2013-06-12 04:27 +1000
  Re: Split a list into two parts based on a filter? Roel Schroeven <roel@roelschroeven.net> - 2013-06-11 22:22 +0200

csiph-web