aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Chris Lovering <[email protected]>2021-07-23 11:28:58 +0100
committerGravatar Chris Lovering <[email protected]>2021-07-23 11:46:22 +0100
commite5ebccc410c38ba84eca555ecef72c4a91cf8779 (patch)
treede394d337ea37269ac6509dd64865aaade94b823
parentFurther describe the funciton in docstring tag (diff)
Update grammer in docstring tag
Co-authored-by: Bluenix <[email protected]>
-rw-r--r--bot/resources/tags/docstring.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/bot/resources/tags/docstring.md b/bot/resources/tags/docstring.md
index 95ad13b35..0160d5ff3 100644
--- a/bot/resources/tags/docstring.md
+++ b/bot/resources/tags/docstring.md
@@ -1,4 +1,4 @@
-A [`docstring`](https://docs.python.org/3/glossary.html#term-docstring) is a string with triple quotes that's placed at the top of files, classes and functions. A docstring should contain a clear explanation of what it's describing. You can also include descriptions of the subject's parameter(s) and what it returns, as shown below:
+A [`docstring`](https://docs.python.org/3/glossary.html#term-docstring) is a string - always using triple quotes - that's placed at the top of files, classes and functions. A docstring should contain a clear explanation of what it's describing. You can also include descriptions of the subject's parameter(s) and what it returns, as shown below:
```py
def greet(name: str, age: int) -> str:
"""
@@ -7,7 +7,7 @@ def greet(name: str, age: int) -> str:
:param name: The name of the person to greet.
:param age: The age of the person to greet.
- :return: String representation of the greeting.
+ :return: The greeting.
"""
return f"Hello {name}, you are {age} years old!"
```