ilya <ilya.nikokoshev@gmail.com> writes:
I was thinking about a good syntax for implicit lambdas for a while
Why were you thinking of this, and why is it important enough to override “explicit is better than implicit”?
and today I had this idea: make ``_:`` a shortcut for ``lambda _=None:``
-1. The name ‘_’ already sees a lot of use as an identifier. It is in common use as a conventional shortcut to the ‘gettext.gettext’ function. It is also commonly used as a name to bind to a value that is returned from some process but not actually needed. Overloading existing conventions of that valid identifier with this special construct is too much, in my view.
Even though ``:`` could theoretically denote implicit lambda, it's too easy to miss it. The combination ``_:`` is much easier to notice.
I disagree; it is too easy to miss. -- \ “Last year I went fishing with Salvador Dali. He was using a | `\ dotted line. He caught every other fish.” —Steven Wright | _o__) | Ben Finney