Contents

3. 注释

3.1. Python

#!/usr/bin/env python
# -*- coding:utf8 -*-
# auther; 18793
# Date:2020/4/21 13:50
# filename: sample1.py
"""This is a doc string for the whole module"""


# This is a inline comment


class Class(object):
    """This is the doc string for the class"""


print(__doc__)  # This is a doc string for the whole module
print(Class.__doc__)  # This is the doc string for the class

Go

package main

// This is a general comment

/* This is also a comment
   but on multiple lines.
*/

/* This is the multi-line comment for the function main().
   To get access to this from the command line, run:

     godoc comments.go

*/

func main() {
}