__name__ is the class name;   返回类名

__module__ is the module name in which the class was defined;   定义此类的模块名

__dict__ is the dictionary containing the class’s namespace;   由类的命名空间组成的字典

__bases__ is a tuple (possibly empty or a singleton) containing the base classes, in the order of their occurrence in the base class list;   一个由基本类组成的数组(也许是空的或只有一个成员),按基类列表中出现的顺序排列

__doc__ is the class’s documentation string, or None if undefined.  类的文档字符串,如果没有定义的话,为空。

Python中的部分特殊属性的更多相关文章

  1. Python中如何获取类属性的列表

    这篇文章主要给大家介绍了在Python中如何获取类属性的列表,文中通过示例代码介绍的很详细,相信对大家的学习或者工作具有一定的参考借鉴价值,有需要的朋友可以参考借鉴,下面来一起看看吧. 前言 最近工作 ...

  2. python中string模块各属性以及函数的用法

    任何语言都离不开字符,那就会涉及对字符的操作,尤其是脚本语言更是频繁,不管是生产环境还是面试考验都要面对字符串的操作.     python的字符串操作通过2部分的方法函数基本上就可以解决所有的字符串 ...

  3. 牛人总结python中string模块各属性以及函数的用法,果断转了,好东西

    http://blog.chinaunix.net/uid-25992400-id-3283846.html http://blog.csdn.net/xiaoxiaoniaoer1/article/ ...

  4. python中模块的__all__属性

    python模块中的__all__属性,可用于模块导入时限制,如:from module import *此时被导入模块若定义了__all__属性,则只有__all__内指定的属性.方法.类可被导入. ...

  5. 【python】python中的定义类属性和对像属性

    python中变量是没有类型的可以绑定任意类型,但是在语法上不能声明变量. 那我们怎麽来声名一个变量呢? f=None 这样我们给着个变量绑定了以各None类型,我们随时可用重新绑定其它类型.这样我们 ...

  6. python中super与成员属性

    super的使用直接看例子: class A(): def __init__(self, a): print('init A...') self.a = a class B(A): def __ini ...

  7. Python中的属性管理

    Python管 理属性的方法一般有三种:操作符重载(即,__getattr__.__setattr__.__delattr__和 __getattribute__,有点类似于C++中的重载操作符).p ...

  8. python中类的三种属性

    python中的类有三种属性:字段.方法.特性 字段又分为动态字段和静态字段 类 class Province: #静态字段 memo = 'listen' #动态字段 def __init__(se ...

  9. python中__dict__和dir()

    转自:http://www.cnblogs.com/ifantastic/p/3768415.html 首先需要知道的是,dir() 是 Python 提供的一个 API 函数,dir() 函数会自动 ...

随机推荐

  1. codeforces 793B. Igor and his way to work

    B. Igor and his way to work time limit per test 3 seconds memory limit per test 256 megabytes input ...

  2. 自学Zabbix2.3-服务器端server安装过程

    点击返回:自学Zabbix之路 ....

  3. 【BZOJ2285】[SDOI2011]保密(分数规划,网络流)

    [BZOJ2285][SDOI2011]保密(分数规划,网络流) 题面 BZOJ 洛谷 题解 首先先读懂题目到底在干什么. 发现要求的是一个比值的最小值,二分这个最小值\(k\),把边权转换成\(t- ...

  4. c c++ 混合编译

    单个源文件生成可执行程序 下面是一个保存在文件 helloworld.cpp 中一个简单的 C++ 程序的代码: 1 2 3 4 5 6 7 8 9 /* helloworld.cpp */    # ...

  5. A1047. Student List for Course

    Zhejiang University has 40000 students and provides 2500 courses. Now given the registered course li ...

  6. property(四十)

    一个静态属性property本质就是实现了get,set,delete三种方法 用法: class Foo: @property def AAA(self): print('get的时候运行我啊') ...

  7. 在Kubernetes集群中安装Helm及证书认证

    安装Kubernetes 测试环境使用kubeadm安装kubernetes v1.6.3版本, 安装过程略过. 为Helm创建客户端认证 客户端认证是为了能够使用helm命令行调用Helm的服务端T ...

  8. maven中修改可用的版本

    一般情况下,我们都是建项目,写代码,然后再部署运行的.到最后因为版本问题无法部署的情况下怎么办?重新建项目,然后导代码,这太麻烦了. 一般的处理情况:在项目的硬盘目录中,找到.setting文件夹下的 ...

  9. python influxdb

    Git:https://github.com/influxdata/influxdb-python 帮助文档:http://influxdb-python.readthedocs.io/en/late ...

  10. 20190312 Windows上Kafka集群

    1. 复制config/server.properties为server1.properties和server2.properties 2. 以server1.properties为例,修改配置 br ...