4 ms·
I think it might also be a "lazy" solution to a more complex problem, which this post does not address: Python allows nested functions to, IIRC, an unspecified
by hermitdev 8y ago
I think it might also be a "lazy" solution to a more complex problem, which this post does not address: Python allows nested functions to, IIRC, an unspecified depth (probably limited by something like stack size). I imagine that that given how Python implements variable lookups, this could be problematic with optimizations in that in the face of nested functions and control paths, it would be very difficult (probably not impossible) to prove they are not used.