Ka-Ping Yee wrote: > > > As for the SyntaxError, i think it's a good idea because the > example could be ambiguous. You would have to either say > > [(x, y), for x in list1, if x > 1, for y in list2, if y > 2] > > or > > [x] + [y, for x in list1, if x > 1, for y in list2, if y > 2] The easy way to avoid the ambiguity is to dump the comma and use colons as Guido intended. [for x in list1: if x > 1: for y in list2: if y > 2: (x,y)] -- Paul Prescod - Not encumbered by corporate consensus Simplicity does not precede complexity, but follows it. - http://www.cs.yale.edu/~perlis-alan/quotes.html
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