Re: list comprehension syntax..?

2006-08-01 Thread Gregory Guthrie
Very helpful, thanks!! So I see that it parses as: m='1' a="asdf" b="1234" print [((m in a) or b) for m in '%d'%1234 ] I get it. Thanks, Greg "Duncan Booth" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Gre

list comprehension syntax..?

2006-08-01 Thread Gregory Guthrie
Sorry for a simple question- but I don't understand how to parse this use of a list comprehension. The "or" clauses are odd to me. It also seems like it is being overly clever (?) in using a lc expression as a for loop to drive the recursion. Thanks for any insight! Gregory ---

language design question

2006-07-09 Thread Gregory Guthrie
I am comparing Python to a few other scripting languages, and used a simple anagrams program as a sample. I was surprised ast a few python features that did not work as I would expect/wish; which caused less compact/expressive program styles that I wanted - reverting to a FORTRAN like series of