I. Scope of processing
(1) Python allows you to access and read the value of a global variable in a function, but it cannot be modified. To access and modify a global variable, you must explicitly indicate your intention (see Code 1), otherwise you will throw a unboundlocalerror (the local variable is not assigned to the value of the reference) (see Code 2).
#Code 1Name="Python"defwhat_happens_here ():Print(name)GlobalName Name=name+"is fantacy!" Print(name) what_happens_here ()Print(name)#Code 2Name="Python"defwhat_happens_here ():Print(name) name=name+"is fantacy!" Print(name) what_happens_here ()Print(name)
II. testing framework provided by Python
(1) UnitTest module
(2) Doctest module
Third, other
(1) Object Relational Tool (ORM), NoSQL, can avoid SQL
(2) Web framework: Diango,zope,turbogears,web2py,pylons
(3) GUI programming: TKINTER,PYGTK,PYKDE,WXPYTHON,PYQT
(4) Multithreading: Python is implemented using a technique called Global interpreter lock (interpreter Lock,gil). Limits python to run only in one interpreter process and cannot take advantage of multicore/processors. See more http://www.zhihu.com/question/21219976
Head First Python Learning notes (others)