Good question but I am going to skirt around the answer because I believe inner functions are used in python because (as you found out) they are protected. At least, that's what I have gathered so far (also new to python). There kind of like a private function in that their functionality is protected from the global scope.
In other words there is essentially no good reason or time when you are going to want to use method nested within another method and if you did you wouldn't.. instead, you would just make a private method completely separate from the other. If your still interested:
In other words there is essentially no good reason or time when you are going to want to use method nested within another method and if you did you wouldn't.. instead, you would just make a private method completely separate from the other. If your still interested:
def functOuter(): print("funcOuter() called") def functInner(): print("funcInner() called") functInner() functOuter()