Rhodri James wrote:
Computer languages are not human languages, but computer language constructs do attempt to map onto human language constructs to provide some measure of comprehensibility. Where a construct like list comprehension maps very well onto idiomatic English, dismissing it as "ad hoc syntax soup" is just plain wrong.
Especially given that Python's comprehensions are taken from Haskell's which are taken from mathematics' set builder notation. Also, care was taken to have a correspondance between comprehension syntax and nested for- and if- statement syntax. Someone recently made a proposal that would break that correspondance and which would be 'ad hoc' and it will surely be rejected.
tjr -- http://mail.python.org/mailman/listinfo/python-list