3 ms·
Python borrowed list-comprehensions from Haskell et al. Lexically scoped closures are from Scheme* and virtually all modern languages have them now. (Well, C++
by idupree 14y ago
Python borrowed list-comprehensions from Haskell et al.
Lexically scoped closures are from Scheme* and virtually all modern languages have them now. (Well, C++ and Java are late on the lambda boat, but C++11 and it seems Java 8 are getting them.) That's a huge influence.
* Scheme was the first Lisp to gain lexical scope, and C of course has lexical scope but not closures, but what's the full history here? It's also part of the lambda calculus.