|
|
|
I am glad this write-up exists. In a few years, when I am smart enough to understand it, it will be available by web search.
(A few years... I am being optimistic...)
manuelg |
Homepage |
08/08/15 - 1:23 am | #
|
|
Hello Manuel,
The key to understanding it is understanding the Python scoping rules. A new function (or method) creates a new scope. This scope contains the local variables for the function - and is implemented as a stack frame object, with the associated code object.
In Python 2.4, generator expressions also create a new scope.
Michael
Michael Foord |
Homepage |
08/08/15 - 3:37 pm | #
|
|
|
Commenting by HaloScan
|