分类: Python/Ruby
2010-11-20 12:19:20
xuxiyao88882011-01-12 23:58:56
root@mini2440:/work/rootfs/python# python2.6 test.py
'import site' failed; use -v for traceback
Traceback (most recent call last):
File "test.py", line 2, in <module>
import os
ImportError: No module named os
chinaunix网友2010-12-03 16:12:58
Python的默认参数如果是列表,应该改这样写 def func(a=None): if (a == None): a = []; a.append(1); print(a); if __name__ == "__main__": func() func() func() func() func()