Op 13-12-16 om 08:13 schreef Veek M: > 4. When you call a nested function (decorator), it generally returns a > wrapper function but I thought he was just returning a reference to a > function object but obviously since it can see it's environment, how is > the stack being setup?
Here you are no longer just talking about nested functions, you are talking about closures. A stack is no longer sufficient for implementing closures. The environment for the nested variables of the closure is often alloceted on the heap. -- Antoon Pardon. -- https://mail.python.org/mailman/listinfo/python-list