Closure function doesn't make sense:
def make_multiplier_of(n): def multiplier(x): return x * n return multiplier times3 = make_multiplier_of(3) times5 = make_multiplier_of(5)Can anybody explain the implementation detail how python can know a function is a closure function and don't delete the enclosing function's name and their value after the enclosing function return ? And where that value is stored ? I didn't even call the
multiplier
function in the make_multiplier_of
function, so how python can go to the body code and know that is a closure function and retain the required information ?