chop() and empty() functions

John Machin sjmachin at lexicon.net
Fri May 26 16:22:15 EDT 2006


On 27/05/2006 2:54 AM, Jeremy L. Moles wrote:

["chop" snipped]

> 
> Furthermore, what do people think about the idea of adding a truly
> empty, no-op global lambda somewhere in Python? I use them a lot

What is the use case? Why write something like """empty(foo, 42, 
cmd="xyzzy")""" when you could merely write "pass" or nothing at all?

> (usually defining a: empty = lambda *a, **k: None somewhere at the
> topmost module space), but if enough people did too, it might be worth
> adding an empty() builtin to much later versions of Python.
> 




More information about the Python-list mailing list