在pythonk ,数据以对象的形式出现——无论是python提供的内置对象,还是使用python或是像C扩展库这样的扩展语言工具创建的对象。尽管在以后才能确定这一概念,但对象无非是内在中的一部分,包含数值和相关操作的集合、
由于对象是pythonk 最基本的概念,从这一章开始我们将会全面地体验pythonr的内置对象类型。
python程序可以分解成模块,语句,表达式以及对象,如下所...
分类:
编程语言 时间:
2014-08-18 18:47:02
阅读次数:
342
We all know the Super Powers ofthis world and how they manage to get advantages in political warfare or evenin other sectors. But this is not a political platform and so we will talkabout a different ...
分类:
其他好文 时间:
2014-08-18 18:42:02
阅读次数:
191
CentOS7+Python3.4+Django1.6.5+Apache2.4+mod_wsgi4.2.7...
分类:
编程语言 时间:
2014-08-18 18:36:52
阅读次数:
251
cc.eventManager.addListener({ event: cc.EventListener.TOUCH_ALL_AT_ONCE, onTouchesMoved:function (touches, event) { ...
分类:
移动开发 时间:
2014-08-18 18:30:42
阅读次数:
199
1 class test(object): 2 def rangetest(self): 3 for i in range(2,0,-1): 4 print i 5 print i 6 i=2 7 wh...
分类:
编程语言 时间:
2014-08-18 18:27:12
阅读次数:
247
文本分类现已比较成熟,各类开源工具不少,现推荐几个比较常用简单的工具:1、scikit-learn:http://scikit-learn.org/stable/index.html python编写调用,里面有各种分类算法svm、随机森林、贝叶斯等,和特征提取,如字、ngram等,几行代码便可以构...
分类:
其他好文 时间:
2014-08-18 17:52:42
阅读次数:
193
提到类型测试,我首先想到python中“鸭子类型”的特点,所谓鸭子类型,即如果它走路像鸭子,叫声也像鸭子,那么对于我们的应用而言,就可以认为它是鸭子了!这一切都是为了功能复用。我们总是需要测试一个对象,尤其是当写一个函数或者方法时,经常需要测试传入的参数是否是一个字符串;下面这个方法利用了内建的is...
分类:
编程语言 时间:
2014-08-18 17:46:32
阅读次数:
165
common lisp的let宏定义如下 (defmacro?our-left?(binds?&body?body)
??`((lambda?,(mapcar?#‘(lambda?(x)
?(if?(consp?x)?(car?x)?x))
?????binds)
??????,@body)
??????,...
分类:
其他好文 时间:
2014-08-18 16:38:12
阅读次数:
252
当pycharm开发python时,中文出现乱码修改setting文件这样就能正常显示
分类:
编程语言 时间:
2014-08-18 16:36:13
阅读次数:
250