On Thu, Feb 11, 2021 at 12:42:39PM +0100, J. Pic wrote: > foo(x): len(x) > > Would be equivalent to: > > foo = lambda x: len(x) > > Would that work?
The question is not whether it would work, but whether it would be a good idea. What benefit does it give? Just write: def foo(x): return len(x) and no new syntax is required. -- Steve _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/IHLLXBN5U7GMLT7GB7RWDZJYVPSWDBMV/ Code of Conduct: http://python.org/psf/codeofconduct/