• Jeremy Hylton's avatar
    Fix SF bug #505315: Make free and cell vars show up consistently in locals(). · 24ea8d3d
    Jeremy Hylton yazdı
    PyFrame_FastToLocals() and PyFrame_LocalsToFast() had a return if
    f_nlocals was 0.  I think this was a holdover from the pre 2.1 days
    when regular locals were the only kind of local variables.
    
    The change makes it possible to use a free variable in eval or exec if
    it the variable is also used elsewhere in the same block, which is
    what the documentation says.
    24ea8d3d
frameobject.c 12.3 KB