Python随笔之文档字符串(DocStrings)
来源:互联网 发布:怎么打开企业淘宝店铺 编辑:程序博客网 时间:2024/06/01 09:55
在Python中有一个奇妙的特性,文档字符串,又称为DocStrings。用它可以为我们的模块,类,函数添加说明性的文字,使程序易读易懂,更重要的是可以通过Python自带的标准方法将这些描述性文字信息输出。下面举例说明。
'''This is My own ModuleDate:2011-09-07Author:Chris MaoThis is description information'''class TestClass: '''This is TestClass' DocStrings''' def func1(): '''this is func1's DocStrings''' passdef func2(): '''this is func2''' print "this is func2"print func2.__doc__
- Python随笔之文档字符串(DocStrings)
- 简明python教程学习笔记之十-DocStrings文档字符串
- 【python coding 6:文档字符串】Python的文档字符串DocStrings
- GoodZhang在学Python(五)--Python中的文档字符串(docStrings)
- Python docstrings
- learning python--Docstrings使用
- Python中的DocStrings
- python中的DocStrings
- docstrings
- DocStrings
- DocStrings
- Python DOCStrings示例程序
- Python随笔之星号在字符串上的应用
- 使用DocStrings为python函数添加注释
- Python 文档化字符串
- Python docstring文档字符串
- python的文档字符串
- 3.14 Python文档字符串
- c/c++中const用法总结
- Winscok API
- 下拉提示(GoogleSuggest)
- PHP无限分类(树形类)
- DB2 执行SQL文件
- Python随笔之文档字符串(DocStrings)
- 【转】Linux--系统时间/硬件时间的设置
- java中synchronized用法
- db2 常用命令
- 获取选定CheckBox控件的值及js实现勾选时勾选相关父子关系
- linux 查找字符串
- smartforms句柄与以簇的方式存储数据。
- Ubuntu配置apache
- antlr笔记