随笔分类 -  Python

摘要:KMP算法的原理,这里我不写,建议参考:http://www.ruanyifeng.com/blog/2013/05/Knuth%E2%80%93Morris%E2%80%93Pratt_algorithm.htmlhttp://blog.csdn.net/v_JULY_v/article/details/6545192http://blog.csdn.net/joylnwang/article/details/6778316这篇博客写的非常好,以本人的能力只能写出更烂的解释 .....所以就不再多此一举了,下面仅仅给出两段代码,分别用C++和Python写的(都已经编译通过),希望能对大家有 阅读全文
posted @ 2013-07-03 15:22 dancingrain 阅读(191) 评论(0) 推荐(0)
摘要:参考连接:http://docs.python.org/2/tutorial/classes.html http://www.pythonclub.org/python-class/private http://blog.csdn.net/mafuli007/article/details/7777641在学习Python的过程中发下,它把类(class)中所有的成员函数和成员变量都看做是"Public"的,作为C++出身的程序员们可能就不习惯了。Python的官方教程中如是说:““Private” instance variables that cannot be acc 阅读全文
posted @ 2013-06-22 19:29 dancingrain 阅读(3161) 评论(0) 推荐(0)