def _len_code(obj):  # see .../Lib/test/test_sys.py
    '''Length of code object (stack and variables only).
    '''
    return (obj.co_stacksize + obj.co_nlocals +
           _len(obj.co_freevars) + _len(obj.co_cellvars) - 1)
Length of code object (stack and variables only).
    
recipes/Python/546530_Size_of_Python_objects_revised/recipe-546530.py