Example Pydoc

python
function
parameters
class
instance_variables
method
optional_parameter
This article discusses a Python function called `some_random_method` that takes three parameters. It also introduces a class named `Dog`, which has both instance and class variables. The class contains the `bark` method, which can take an optional ‘loud’ parameter and returns ‘woof’. The existence of this method was generated by pdoc version 0.10.0.
Published

February 17, 2023



description: |

API documentation for modules: example_docstring.

lang: en

classoption: oneside

geometry: margin=1in

papersize: a4

linkcolor: blue

links-as-notes: true

Module example_docstring

a 狗 that will bark.

Variables

Variable global_var

some global variable2 Default to None

Variable global_var2

some other global variable

Functions

Function some_random_method

def some_random_method(
    param_1: str,
    param_2,
    kw_param_1=None
) ‑> None

just a random method

Args

—–=

param_1 : str

parameter at position 1

param_2 : str

parameter at position 2

kw_param_1 : Any, optional

keyword parameter 1. Defaults to None.

Return

—–=

Nothing returned.

Note

—–=

Extra Notes?

import os
os.system("ls -lth")

Classes

Class Dog

class Dog(
    name: str
)

dog class

Make a Dog without any friends (yet).

Class variables

Variable friends

Type: List[example_docstring.Dog]

The friends of our dog.

Variable name

Type: str

The name of our dog.

Methods

Method bark
def bark(
    self,
    loud: bool = True
)

woof


Generated by pdoc 0.10.0 (https://pdoc3.github.io).