6 ms·
In python nested functions must be declared before calling them. Also stuff like this seems to crop up on me when I ry using closures: http://stackoverflow.com/
by crizCraig 15y ago
In python nested functions must be declared before calling them. Also stuff like this seems to crop up on me when I ry using closures: http://stackoverflow.com/questions/2516652/scoping-problem-in-recursive-closure http://stackoverflow.com/questions/2516652/scoping-problem-i...
- riffraff 15y agothat is what I meant as having a better syntax for anonymous functions. I agree it's bad (even with nonlocal in python 3) but that is not a matter of different scoping rules, it's only syntax.