2013年11月26日星期二

About tracing and more

In this week's lecture, we talked about tracing and memory model. Professor Danny guide us through some of the recursion example using the python visualizer which I belief some of us have used in csc108 before. Python namespaces and scopes are also covered, the invention of python namespace and scope can lower the chances of confusion and also ensure when running a program, Python is calling the right function and using the right parameter. An example of local scope, non local scope and global scope was used to demonstrate the idea. However, it is quite confusing as I was not able to get the idea of the global scope. I don't understand why did the global scope called gave a spam non local spam. I did not have enough time to stay after class ended to ask Professor Danny because I have another class right after the 9am lecture. As soon as I went home, I review Professor Danny's annotated notes that was posted on the csc148 webpage and read the attached python notes that he put about 9.2. Python Scopes and Namespaces. This notes gave a detail breakdown of each component and I found this a big help. I understand a lot bettr now.  It is almost the end of the term, I feel like I've learned a lot in the term and is becoming more familiar with the Python language. I am looking forward to our last few lecture and hope everything can come into a good conclusion.

没有评论:

发表评论