Actually about PEP 202 (listcomps), not (was RE: [Python-Dev] Lukewarm about range literals)

Thomas Wouters thomas@xs4all.net
Tue, 29 Aug 2000 13:02:14 +0200


On Tue, Aug 29, 2000 at 05:45:24AM -0400, Tim Peters wrote:

> Saving two characters (":" vs "for") isn't worth it in Python.  The
> vertical bar *would* be "worth it" to me, because that's what's used in
> SETL, Haskell *and* common mathematical practice for "such that".  Alas,
> as Guido is sure to point out, that's too hard to parse

It's impossible to parse, of course, unless you require the parentheses
around the expression preceding it :)

[ (n) | n in range(100) if n%2 ]

I-keep-writing-'where'-instead-of-'if'-in-those-ly y'rs,
-- 
Thomas Wouters <thomas@xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!