On Thu, 03 Apr 2008 10:07:38 +0200, sam wrote: > [EMAIL PROTECTED] napisaĆ(a): > > >> So, while I often use Python's lambdas, the imposed limitations is ok >> to me since I wouldn't use it for anything more complex. > >> Also - as a side note - while the syntax is a bit different, the >> resulting object is an ordinary function. > > And people start asking why this is that or the other way in Python, and you > can't give a good answer to newcomers, especially if Python was chosen as a > first learning language. You can't tell "because Python's parsing mechanism > don't allow statements in expressions...".
But one can tell "because the way Python's syntax is based on indentation, no one has come up with a syntax for anonymous functions without the limitations of the current ``lambda``, that doesn't need 'curly braces' and is still as readable as Python is now." Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list