1. python 文档字符串
来源:互联网 发布:js 过滤特殊字符 编辑:程序博客网 时间:2024/05/25 19:56
Document String:
Here are some conventions about the content and formatting of documentation string:
The first line should be short, concise summary of the obejct's purpose. For brevity, it should not explicitly state the object's name or type,since these are available by other means . This line begin with a capital letter and end with a period.
If there are more lines in the documentations string.the second lines should be a blank. visually separating the summary from the rest of the description.The following lines should be one or more paragraphs describing the object's calling conventions ,its side effect,etc.
The Python parser does not strip indentation from the multi-line string liberals in Python. So tools that process documentation have to strip indentation if desired.This is done using the following convention. The first non-blank line after the first line of the string determines that the amount of indentation for the entire document string.whitespace "equivalent" to this indentation is then stripped from the start of all lines of the string .Lines that are indented less should not occur, but if they occur all their leading whitespace should be stripped. Equivalence of whitespace should be tested after expansion of tabs.
Here are example of the multi-line docstring:
<pre name="code" class="python" style="text-align: justify;">def my_function(): """ hey , first line is a short ,concise summary ok, the second line is a blank line ,it separating the summary from the rest of the description.
<span style="white-space:pre"></span>"""
print (my_function.__doc__)
- 1. python 文档字符串
- Python 文档化字符串
- Python docstring文档字符串
- python的文档字符串
- 3.14 Python文档字符串
- python文档字符串
- python打印文档字符串
- 【python coding 6:文档字符串】Python的文档字符串DocStrings
- python中的文档字符串(docString)
- python中的文档字符串(docString)
- 理解python中的文档字符串
- python中的文档字符串(docString)
- Python随笔之文档字符串(DocStrings)
- 三、Python:函数、模块、文档字符串
- Python中的文档字符串的作用
- 转:python中的文档字符串(docStri…
- python文档字符串查找应用---find()
- python整理笔记3---__doc__(文档字符串)
- 表达式求值
- Theatre Square
- 嗨,超表应用上线了!
- spring @Transactional 事务不回滚的其中一个原因
- nginx Nginx 之四: Nginx服务器的压缩功能和缓存功能
- 1. python 文档字符串
- Android Studio 的 Instant Run 惹的祸
- Apple Swift编程语言开发入门教程
- HDFS2.X的HA+Resourcemanager的HA
- Android Service完全详解,经典实用篇
- C#线程系列讲座(4):同步与死锁
- live555源代码分析
- Maven tomcat嵌入运行
- 通过聚合数据API实现快递数据查询-短信验证码-企业核名