I sent the message below to the 11 developers here in the office this morning. They all have 10+ years experience with C, and 2-3 years with C++, Java, or both. None have used Python (I'm working on it :-), but two have extensive Perl experience, and one worked on and with functional languages in grad school. The question was: OK, folks, language question. Given the statement: for x in [10, 20, 30]; y in [1, 2]: print x+y (note that the second list is shorter than the first), would you expect to see: (A) 'x' and 'y' move forward at the same rate: 11 22 (B) 'y' goes through the second list once for each value of 'x': 11 12 21 22 31 32 (C) an error message because the two lists are not the same length? Votes to me, please. Thanks, Greg *Everyone* voted (B). As useful as this capability is, I therefore think the proposed syntax is likely to mislead. Hope it's helpful, Greg
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