2 ms·
It's absolutely insane that this is apparently the expected behavior. It makes no sense whatsoever except to give people who know this an ego boost when they ca
by Oxitendwe 10y ago
It's absolutely insane that this is apparently the expected behavior. It makes no sense whatsoever except to give people who know this an ego boost when they can successfully work around Python's unintuitive semantics while inexperienced people cannot. It completely breaks functions, the most fundamental unit of encapsulation and abstraction in every modern programming language.
- pmarreck 10y agoIt's surprising how few languages actually support anonymous functions with closures properly. Not to plug my 2 favorites that do (Ruby and Elixir/Erlang) or anything...