FAQ

"Magnus L. Hetland" wrote:
[(i, s) for i in nums and s in strs]
That would be ambiguous, because it could be parsed as

[(i, s) for i in (nums and s in strs)]

It *might* be feasible to use

[(i, s) for i in nums and for s in strs]

If I get a spare moment or two one day I'll try this
and see whether the parser chokes. (Python's parser
is a bit strange - it's hard to predict what it can
handle and what it can't.)

Greg

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 3 of 4 | next ›
Discussion Overview
grouppython-list @
categoriespython
postedDec 13, '99 at 12:39a
activeDec 13, '99 at 10:29p
posts4
users3
websitepython.org

People

Translate

site design / logo © 2022 Grokbase