I am wondering how I can access a function inside another function. I saw code like this:
>>> def make_adder(x): def adder(y): return
I'm not sure this helps, but you can use the __call__ boilerplate to simulate the behavior you're looking for. For example:
__call__
class MakeAdder: def __init__(self, x): self.x = x def __call__(self, y): return self.x + y a = MakeAdder(5) a(10) 15