News for hackers. Stuff that matters.
Re:Electron considered harmful by MereInterest on Thursday November 24, 2016 @01:15PM (#13031791)
Now I'm curious. What would you say is wrong with python closures? Asking because they feel natural to me, and I haven't run into anything irritating about them. (As opposed to lambdas, which are really annoying and restricted in Python.)
Re:Electron considered harmful by qwertyuiop924 on Thursday November 24, 2016 @01:19PM (#13031822)
It's not as bad as I thought, but Python doesn't actually have lexical scope, not really. But the LEGB rules mean that it should still work as you expect.
Re:Electron considered harmful by TJSomething on Thursday November 24, 2016 @01:34PM (#13031926)
It does if you're using Python 3, which has the nonlocal keyword for lexical scope.
Re:Electron considered harmful by qwertyuiop924 on Thursday November 24, 2016 @03:12PM (#13032474)
Finally. But that should really be default.