>>>>> "BAW" == Barry A Warsaw <bwarsaw@beopen.com> writes: BAW> | print [i, s for i in nums for s in strs] BAW> | print [i, s for i in nums for s in [f for f in strs if "n" in f]] BAW> Yow! No one will accuse Python of only having one way to do it BAW> anymore! Even without the curse-word-symbols, I fear excessive BAW> scalp exposing head-scratching when I see this in code. I think these examples demonstrate the need for some punctuation, though perhaps not curse-word-symbols. I really like the vertical bar that Haskell uses to separate the variables being assigned to from the generator expression. It's a very familiar notation from mathematics. There also needs to be some punctuation to separate each generator expression when there is more than one. Commas and semicolons both seem reasonable viewed in isolation; commas are problematic because they are already used for tuple creation. Jeremy
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4