Re: Nested functions, how do they work (stack related)

2016-12-13 Thread Veek M
Marko Rauhamaa wrote: > Veek M : > >> https://en.wikipedia.org/wiki/Call_stack >> >> 'Programming languages that support nested subroutines also have a >> field in the call frame that points to the stack frame of the latest >> activation of the procedure that most closely encapsulates the >> call

Re: Nested functions, how do they work (stack related)

2016-12-13 Thread Antoon Pardon
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 n

Re: Nested functions, how do they work (stack related)

2016-12-13 Thread Veek M
http://web.archive.org/web/20111030134120/http://www.sidhe.org/~dan/blog/archives/000211.html (great tail recursion article - best i've seen! SO doesn't really explain it unless you already knew it to begin with, but here's the link:http://stackoverflow.com/questions/310974/what-is-tail-call-opti

Re: Nested functions, how do they work (stack related)

2016-12-13 Thread Marko Rauhamaa
Veek M : > https://en.wikipedia.org/wiki/Call_stack > > 'Programming languages that support nested subroutines also have a field > in the call frame that points to the stack frame of the latest > activation of the procedure that most closely encapsulates the callee, > i.e. the immediate scope o

Re: Nested functions, how do they work (stack related)

2016-12-13 Thread Veek M
Veek M wrote: > I was reading the wiki on 'Call stack' because I wanted to understand > what a traceback object was. My C/C++ isn't good enough to deal with > raw python source since I have no background in CS. Also, you just > can't dive into the python src - it takes a good deal of reading and >

Nested functions, how do they work (stack related)

2016-12-12 Thread Veek M
I was reading the wiki on 'Call stack' because I wanted to understand what a traceback object was. My C/C++ isn't good enough to deal with raw python source since I have no background in CS. Also, you just can't dive into the python src - it takes a good deal of reading and background.. (the ty