Python
文章平均质量分 62
akiyame
这个作者很懒,什么都没留下…
展开
-
在windows下关联py文件到IDLE直接打开并可调试的方法
原文:http://wind13.blog.163.com/blog/static/24823492011761535602/转载 2014-06-29 08:44:45 · 6990 阅读 · 1 评论 -
python中List的sort方法(或者sorted内建函数)的用法
转载地址:http://gaopenghigh.iteye.com/blog/1483864转载 2014-07-02 15:09:45 · 1148 阅读 · 0 评论 -
python assertRaises
with self.assertRaises(TypeError) as pe: f.fail()self.assertEqual( 'The draft must be public first.', str(pe.exception))原创 2015-02-19 18:10:40 · 9323 阅读 · 1 评论 -
负面测试 (Testing for failure) assertRaises
原文:http://woodpecker.org.cn/diveintopython/unit_testing/testing_for_failure.html13.5. 负面测试 (Testing for failure)使用有效输入确保函数成功通过测试还不够,你还需要测试无效输入导致函数失败的情形。但并不是任何失败都可以,必须如你预期地失败。转载 2015-02-20 18:31:13 · 4968 阅读 · 0 评论 -
python Property属性用法
原文:http://www.cnblogs.com/lovemo1314/archive/2011/05/03/2035600.html假设定义了一个类:C,该类必须继承自object类,有一私有变量_xclass C: def __init__(self): self.__x=None 1.现在介绍第一种使用属性的方法: 在该类中定义三个函数,分别用作赋值、转载 2015-02-25 14:29:19 · 835 阅读 · 0 评论 -
简明 Python 编程规范
原文:http://blog.csdn.net/gzlaiyonghao/article/details/2834883赖勇浩(http://laiyonghao.com)注:之前发布一篇《简明 Python 编程规范》(见:http://blog.csdn.net/lanphaday/article/details/2834883),本是我给当时所在的公司制定的,发表到博客的转载 2015-06-25 18:47:44 · 553 阅读 · 0 评论