""" name space概念 name space 是 name 和object 之间的映射关系。 每一个name唯一的和一个object绑定。 一个object可以有多个name。 如果没有name和object绑定,那么object就会消失了。 name space 是一个动态的数据结构,dictionary。 objname = object 会创建一个name. """
def testfun(): print locals() print globals()
print testfun();
## 类 class object ## class Student: age = 12; name = "ck"; def __init__(self): print "student>init"; def outputName(self): print "ck";