News for hackers. Stuff that matters.
Re:Stop writing lambda expressions in Python by JasonFruit on Thursday September 27, 2018 @04:13PM (#18088136)
I suppose I like the readability too, but there are a number of things about the language I would rather had been done differently; I still insist that its approach to scope is worse than any choice except making everything global.
Re:Stop writing lambda expressions in Python by alexchamberlain on Thursday September 27, 2018 @04:21PM (#18088211)
I tend to recommend people refavtor their functions into smaller ones if scope is not clear, but I accept it's different from many of its predecessors.
Re:Stop writing lambda expressions in Python by AlexCoventry on Thursday September 27, 2018 @06:40PM (#18089487)
If the local/ global scooping rules are hurting you that much, you are probably putting more state in module-level variables than is healthy.
Re:Stop writing lambda expressions in Python by JasonFruit on Thursday September 27, 2018 @08:33PM (#18090073)
It's not that: it's the hobbled function scope that doesn't handle nested functions the way I would expect and hope.