Anonymous function: Difference between revisions

Content deleted Content added
Citation bot (talk | contribs)
Removed parameters. | Use this bot. Report bugs. | #UCB_CommandLine
AstroFloyd (talk | contribs)
m Python: Fix typos.
Line 1,468:
</syntaxhighlight>
 
In general, the Python convention encourages the use of named functions defined in the same scope as one might typically use an anonymous functionsfunction in other languages. This is acceptable as locally defined functions implement the full power of [[closure (computer science)|closure]]s and are almost as efficient as the use of a lambda in Python. In this example, the built-in power function can be said to have been [[Currying|curried]]:
 
<syntaxhighlight lang="pycon">