python
文章平均质量分 55
likely001
明天更美好
展开
-
python中的type,元类,类,对象
type,元类,类,对象简单描述1.type是python内建元类,新建的元类需要继承type 2.元类用来创建类,类用来创建对象类的生成方式传统定义通过声明关键字class#1.创建Person类#2.继承object#3.拥有属性eatclass Person(object): def eat(self,food="rice"):原创 2018-05-19 21:44:21 · 2898 阅读 · 0 评论 -
python中的class
python中的classpython 2.x(准确的说从2.2开始) class 有俩种定义方式 分为 新式类 和 经典类//新式类class Foo(object): pass>>> Foo.__base__<type 'object'>>>> Foo.__base原创 2018-05-19 21:49:33 · 778 阅读 · 0 评论 -
python中的type和object
object 和 typepython中object是所有类的基类>>> type.__bases__ //type元类的基类(<class 'object'>,)class Foo(object): pass>>> Foo.__bases__ //自定义类F原创 2018-05-19 21:50:25 · 443 阅读 · 0 评论 -
python中的new和init
new(),init()官方的几句描述new() and init() work together in constructing objects (new() to create it, and init() to customize it)If new() returns an instance of cls, then the new instance’s init() me...原创 2018-05-19 21:51:20 · 813 阅读 · 0 评论 -
FastDFS分布式存储服务器安装
###FastDFS分布式存储服务器安装环境:ubantu16,anconda,python3.6.2####fastdfs安装相关包说明libfastcommon-master.zip 依赖包fastdfs-master.zip 安装包依赖包安装unzip libfastcommon-master.zipcd libfastcommon-master./mak...原创 2018-10-18 16:24:10 · 252 阅读 · 0 评论 -
全文检索python
####全文检索全文检索不同于特定字段的模糊查询,使用全文检索的效率更高,并且能够对于中文进行分词处理#####haystack全文检索的框架,支持whoosh、solr、Xapian、Elasticsearc四种全文检索引擎,点击查看[官网](http://haystacksearch.org/)#####whoosh纯Python编写的全文搜索引擎,虽然性能比不上sphinx、xap...翻译 2018-11-11 11:27:32 · 5198 阅读 · 0 评论