--------
os se ?
--------
I'm not sure what os se is but as a guess I think os could be operating system. For example Python has a module in the standard library called os which contains interfaces for the operating system. I've only ever seen se refer to "special edition" in general but I can't say for sure what "os se" is.
http://docs.python.org/2/library/os.html
--------------
parameter
--------------
http://en.wikipedia.org/wiki/Parameter_%28computer_science%29
A parameter is essentially a variable. To understand and remember what a parameter is follow with me.
x = 1
Here x is a variable and 1 is a value of type int, that's being assigned to the x variable.
Pretty straight forward right? The value is the data, the variable is the container for the data.
def a(x):
....print x
a(1)
Here we have a "function definition" in the first two lines. The last line is a "call" to the function.
In the first line of the function definition you have whats called the function header. Functions can be thought of as small boxes with input and output. The input is in the function header in the part enclosed by parenthesis.
Ok so you might think of the x in the function header as a variable and the 1 in the last line as a value being assigned to x when the function is called. You wouldn't be far off, but with functions we use a slightly different terminology. We call the x a parameter and the 1 an argument. Many people actually don't know the difference between a parameter and an argument.
Arguments are passed to parameters ; values is assigned to variables.
Take note though that when you actually use the parameter x in the "body" of the function, it's no longer a parameter, it's just another local variable and can be changed.
--------------------
smart compiler
---------------------
In computer science you have compilers, optimizing compilers and then you have smart compilers.
A compiler is just a program that takes your source code and converts it into executable code, 1s and 0s.
An optimizing compiler doesn't just convert your code, it optimizes it using a number of techniques.
A smart compiler doesn't just optimize your code using a set of standard techniques, it tries out the different techniques to see what works best because optimization is not so straight forward and some optimizations may even make the program slower. So a smart compiler can "do experiments" with your code.
http://www.ai.mit.edu/projects/reinventing_computing/papers/theses/pshuang/meng/node7.html
----------------
stack frame
----------------
Firstly what is a stack.
http://en.wikipedia.org/wiki/Call_stack
Then a stack frame is a call to a function/subroutine that has not yet terminated with a return statement. In other words a call that is still active. A recursive stack frame is a call in a recursive stack that has not yet terminated.
----------------
Passing a function as an argument
----------------
First, in Python you can pass the return value of a function as an argument to another function like this.
def a():
....return 1
def b(x):
....print x
b(a())
>>> 1
What will happen is a() will run and it will return 1 so that last line effectively becomes
b(1)
which is passed as an argument to the x parameter in b.
Second, you can pass a function itself as an argument to another function. Most beginners will confuse these two cases which is why I first explained the first case of passing the return value of a "function call" to another function and then the second case of passing the function itself.
In the second case you pass the function name not a call to the function.
def a():
....print 1
def b(x):
....x()
b(a)
>>> 1
Just look at that carefully until it clicks.
Rest of the answer is here:
http://pastebin.com/33mTZak2