Guido: > Someone else: > > > I was its only fan within PythonLabs, and I was lukewarm. The trick is to > > view "if c else" as a new short-circuiting infix binary operator (for each > > c), and then it makes great-- even elegant --sense. I think it makes sense in its own right -- no need for "tricks". > Also I believe it would create a parsing problem in list > comprehensions; > > [x for x in range(10) if small else range(100)] Parentheses would need to be required in that case: [x for x in (range(10) if small else range(100))] I don't see that as a big problem -- wanting to put a conditional expression in that position is going to be fairly rare. Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | A citizen of NewZealandCorp, a | Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. | greg@cosc.canterbury.ac.nz +--------------------------------------+
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