Split a list into two parts based on a filter?

Fábio Santos fabiosantosart at gmail.com
Tue Jun 11 14:05:35 EDT 2013


On 11 Jun 2013 18:48, "Chris Angelico" <rosuav at gmail.com> wrote:
>
> On Wed, Jun 12, 2013 at 3:23 AM, rusi <rustompmody at gmail.com> wrote:
> > On Jun 11, 10:05 pm, Fábio Santos <fabiosantos... at gmail.com> wrote:
> >> On 11 Jun 2013 17:47, "rusi" <rustompm... at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20130611/afdf4704/attachment.html>


More information about the Python-list mailing list