![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
iteye_10732
这个作者很懒,什么都没留下…
展开
-
pythone中的mutable(可改变的)默认参数
def add(x=[]): x.append(1) print xadd()add()add([])add() 输出>>> [1][1, 1][1][1, 1, 1]>>> 如果调用方法add() 没提供参数的话,那边就一直使用相同的x!...原创 2011-03-03 10:33:01 · 118 阅读 · 0 评论 -
python 常用模块
原文:http://www.pythonclub.org/python-basic/moduledifflib python diff比较模块datetime python 处理日期与时间的模块chardet 字符串/文件 编码检测(很好用)adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较...原创 2011-03-05 10:15:00 · 110 阅读 · 0 评论