How I see it is simply, first you have a simple list, that finds the largest number. But what if you have a nested list. This case is simple, similarly you call the same function again through the nested lists, than find the max between the nested and non-nested lists. The examples given in the slides were straight forward and allows one to see how recursive calls could find the max number easily. Just as any day was a nice way to fully understand recursion, and how we can trace a code ourselves.
Interesting enough we moved on to have a deeper understanding of scopes and namespaces. Namespaces are defined as the mapping of names to objects. Some examples of that could be the global names in a module, for example: If you have a module named GetStudent.py. Then have a class within that called Student(): or you have local names such as a method named add()
The important thing I understand from a namespace is between module to module you can have the same name to a method in both, in order to differ between the two you must call with the prefix of the module or class, ex: GetStudent.add().
In addition to namespace, there are scopes. What the namespace is declared to be and the scope in which they can be found or called without having to assign where the function is.
for example, a function named
there is a local name of a function: add_numbers() which is the inner-most
--i see this as the function that is in the program you are working with.
then there could be a function which is called with the module name, so there is a module named mathematics, the outermost scope is mathematics.add_numbers()
-- at this point it could be in, or out of the module, but it will search the module then find the local name of the function for execution.
then the last place to search for this function name would be in the builtin namespaces.
for example: max()
--after not finding the name anywhere in your own namespaces, lets look through global namespaces.