On Tuesday, August 16, 2016 at 7:22:42 PM UTC+12, Ian wrote: > On Aug 16, 2016 12:57 AM, "Lawrence D’Oliveiro" wrote: > > But perhaps this limitation wasn’t intentional, just an inherent > consequence of the fact that Python’s significant-whitespace rules only > apply to statements, not expressions... > > I think the primary reason for that is just that nobody has yet come up > with a good syntax proposal for anonymous functions to contain statement > lists.
Only because Python makes it difficult, for the reason I mentioned. Other languages have had no trouble with it. For example, Perl and JavaScript use their existing function-definition constructs, just omitting the function name. -- https://mail.python.org/mailman/listinfo/python-list