Content deleted Content added
(why Python doesn't have closures) |
Removed "merge this with Function object" note |
||
Line 77:
Python has nested scope, but not the ability to modify variables in outer lexical scopes (except for globals, and via reflexion). Therefore, Python doesn't have closures. It's that simple. --[[User:Lament|Lament]]
== Removed "merge this with Function object" note ==
Closures are a critically important concept in programming languages (and computer science) and definitely deserve their own separate article. They are different from [[Function object]]s, despite the fact that the two are sometimes confused.
|