美文网首页
Python 注释文档

Python 注释文档

作者: _沉默的疯子 | 来源:发表于2019-04-22 21:02 被阅读0次

函数注释文档

def test(name, age):
    """
    Rest风格 注释 
    :param name: 参数注释
    :param age: 参数注释
    :return: 返回注释
    """
    print("hello")
    return name
def test1(name, age):
    """
    Google风格 This is groups style docs.

    Parameters:
        name - this is the name param
        age - this is a age param

    Returns:
        This is a description of what is returned

    Raises:
        KeyError - raises an exception
    """
    name = "andy"
    age = 10
    return "yoyo"
help(test1)

相关文章

  • Python中的注释和文档

    下面就Python中的注释做一些演示:单号注释,多行注释,文档注释 1. 单行注释 # This is a sin...

  • Python 注释文档

    函数注释文档

  • python代码:开发指南

    为什么记录代码如此重要 注释与文档代码 注释代码基础 通过类型提示(python 3.5+)注释代码 使用docs...

  • Python学习笔记

    1. 注释 python中使用'''或者"""进行文档注释,类似于java中的javadoc 2. 下划线_ _ ...

  • python基本语法:注释与引导、标识符

    注释与引导 不参与编译执行,一般是程序员自己添加的文档注释 单行注释 在python中,单行注释用#,快捷键 Ct...

  • Java基础之单行、多行、文档注释

    单行 //我是单行注释 多行 /* 我是多行注释 */ 文档注释 /** 我是文档注释 */ 文档注释和单行、多行...

  • 2017-05-10

    单行注释、多行注释与文档注释的合理使用 单行注释、多行注释与文档注释的合理使用 单行注释:// 注释内容 多行注释...

  • 一起学Python系列|Python基础语法

    Python基础语法 一、注释 Python中的注释有单行注释和多行注释: 1.1 单行注释 Python中单行注...

  • 注释

    -//单行注释 -/*多行注释*/ -/**文档注释*/

  • python基本知识

    python注释单行注释 #这是注释内容多行注释 ''' 这是注释内容 ''' python一些保留字and,...

网友评论

      本文标题:Python 注释文档

      本文链接:https://www.haomeiwen.com/subject/qsaugqtx.html