摘要: http://www.liaoxuefeng.com/wiki/001374738125095c955c1e6d8bb493182103fac9270762a000/001374738449338c8a122a7f2e047899fc162f4a7205ea3000#0讲的尤其好,这一节有些内容比较... 阅读全文
posted @ 2015-01-15 18:28 Thermo 阅读(107) 评论(0) 推荐(0) 编辑
摘要: 数据类型检查可以用内置函数isinstance实现:1 def my_abs(x):2 if not isinstance(x, (int, float)):3 raise TypeError('bad operand type')4 if x >= 0:5 ... 阅读全文
posted @ 2015-01-15 11:24 Thermo 阅读(181) 评论(0) 推荐(0) 编辑
摘要: 有80个内置函数官网https://docs.python.org/2/library/functions.html查询内置函数的功能描述用 help(内置函数名)The Python interpreter has a number of functions built into it that ... 阅读全文
posted @ 2015-01-15 11:02 Thermo 阅读(205) 评论(0) 推荐(0) 编辑
摘要: 不用easy_install,那个麻烦。直接用python 自带的setup.py就可以。你自己配置一个setup.py,看帮助,或者是找一个例子,分开来看。很容易的。10分钟就会了。如果用pypy setup.py install,那么安装到pypy库里。 如果用python setup.py i... 阅读全文
posted @ 2015-01-15 00:33 Thermo 阅读(270) 评论(0) 推荐(0) 编辑
摘要: PyPI - the Python Package IndexThe Python Package Index is a repository of software for the Python programming language. There are currently53841packa... 阅读全文
posted @ 2015-01-15 00:14 Thermo 阅读(276) 评论(0) 推荐(0) 编辑