{Function | Method} {Comments (註解) | Docstrings (說明)}

Google Style1Google Python Style Guide: Comments and Docstrings

 

def method(arg1[: type1][, arg2[: type2], ...])[ -> return_type]:
  """A one-line summary.

  An overall description, 
  it may also contain a brief description and/or usage examples.

  Args:
    ...

  Returns / Yields (for generators):
    ...

  Raises:
    ...
  """

  ...

 

Last Updated on 2025/01/07 by A1go

References

目錄

目錄
Bitnami