1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
"""
bar.py
Example module with a function and a class.
See Also:
[[test_pkg.bar.greet]]
[[test_pkg.bar.Greeter]]
[[test_pkg.bar.Greeter.greet]]
"""
=
"""
Return a greeting message. This function is part of [[test_pkg.bar|The `bar` Module]]
Args:
name (str): Name to greet.
Returns:
str: Greeting message.
Example:
>>> greet("Anna")
'Hello, Anna!'
"""
return f
return f
"""
Format the name string to title case (private helper).
Args:
name (str): Name string.
Returns:
str: Formatted name.
"""
return
"""
Greeter class that holds a name and greets.
Attributes:
name (str): The name to greet.
"""
=
"""
Initialize with a name.
Args:
name (str): Name to greet.
"""
=
"""
Generate a greeting message. This is a method on the [[test_pkg.bar.Greeter]] class.
It is distinct from the [[test_pkg.bar.greet]] function.
Returns:
str: Greeting message.
"""
return f