Edit on GitHub

demo

A small pdoc example.

 1"""
 2A small `pdoc` example.
 3"""
 4
 5class Dog:
 6    """🐕"""
 7    name: str
 8    """The name of our dog."""
 9    friends: list["Dog"]
10    """The friends of our dog."""
11
12    def __init__(self, name: str):
13        """Make a Dog without any friends (yet)."""
14        self.name = name
15        self.friends = []
16
17    def bark(self, loud: bool = True):
18        """*woof*"""
class Dog:
 6class Dog:
 7    """🐕"""
 8    name: str
 9    """The name of our dog."""
10    friends: list["Dog"]
11    """The friends of our dog."""
12
13    def __init__(self, name: str):
14        """Make a Dog without any friends (yet)."""
15        self.name = name
16        self.friends = []
17
18    def bark(self, loud: bool = True):
19        """*woof*"""

🐕

Dog(name: str)
13    def __init__(self, name: str):
14        """Make a Dog without any friends (yet)."""
15        self.name = name
16        self.friends = []

Make a Dog without any friends (yet).

name: str

The name of our dog.

friends: list[Dog]

The friends of our dog.

def bark(self, loud: bool = True):
18    def bark(self, loud: bool = True):
19        """*woof*"""

woof