• Meador Inge's avatar
    Issue #24485: Function source inspection fails on closures. · 5b718d7f
    Meador Inge yazdı
    The fix for Issue #21217 introduced a regression that caused
    `inspect.getsource` to return incorrect results on nested
    functions.  The root cause of the regression was due to
    switching the implementation to analyze the underlying
    bytecode instead of the source code.
    
    This commit switches things back to analyzing the source code
    in a more complete way.  The original bug and the regression
    are both fixed by the new source code analysis.
    5b718d7f
test_inspect.py 135 KB