Alexey Muranov <alexey.mura...@gmail.com> writes: > It would be however more convenient to be able to write instead just > > f(x) = x*x
That's not an anonymous function then, is it? You want to assign a name to that function, and (to be useful in development tools, such as a stack trace) the function needs to know its own name. The way to do that is, as you point out, the ‘def’ statement: def f(x): return (x * x) What does that prevent you from doing? It will need to be pretty significant improvement to be considered as a change to language syntax. > Have this idea been discussed before? Too many times to count :-) -- \ “Theology is the effort to explain the unknowable in terms of | `\ the not worth knowing.” —Henry L. Mencken | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list