docstring规范中最基本的两点:

1、所有的公共模块、函数、类、方法,都应该写 docstring 。私有方法不一定需要,但应该在 def 后提供一个块注释来说明。

2、docstring 的结束"""应该独占一行,除非此 docstring 只有一行。

"""Return a foobar
Optional plotz says to frobnicate the bizbaz first.
"""

"""Oneline docstring"""

 

相关文章:

  • 2021-11-22
  • 2022-12-23
  • 2022-12-23
  • 2021-12-09
  • 2022-12-23
  • 2022-02-11
  • 2022-12-23
  • 2021-10-03
猜你喜欢
  • 2021-11-29
  • 2022-12-23
  • 2021-09-10
  • 2021-06-06
  • 2022-01-06
  • 2022-12-23
  • 2022-01-20
相关资源
相似解决方案