"Jeremy L. Moles" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Furthermore, what do people think about the idea of adding a truly > empty, no-op global lambda somewhere in Python?
In an important sense, there is no such object as a 'lambda' in Python. There are only function objects created with lambda expressions, which are pretty much abbreviations of simple def statements. > I use them a lot For what? > (usually defining a: empty = lambda *a, **k: None somewhere at the > topmost module space), Better to write 'def empty(*a,**k): pass' since this requires fewer keystrokes, attached the specific name 'empty' to the function object instead of the generic pseudoname '<lambda>', and does not feed the misunderstanding of lambda expressions. > but if enough people did too, it might be worth > adding an empty() builtin to much later versions of Python. This seems to be a rare need, at least as expressed on clp. Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list