Skip to content

Commit 705fa8a

Browse files
[3.13] feat(docs): type fix - apply pep8 by using docstring instead of comment in the doc. (GH-135181) (#135211)
feat(docs): type fix - apply pep8 by using docstring instead of comment in the doc. (GH-135181) Giving the right example incitates the tutorial readers to do the same in the future. (cherry picked from commit 3431828) Co-authored-by: Jean-Louis GUENEGO <jlguenego@gmail.com>
1 parent d864a91 commit 705fa8a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Doc/tutorial/modules.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,16 @@ called :file:`fibo.py` in the current directory with the following contents::
2727

2828
# Fibonacci numbers module
2929

30-
def fib(n): # write Fibonacci series up to n
30+
def fib(n):
31+
"""Write Fibonacci series up to n."""
3132
a, b = 0, 1
3233
while a < n:
3334
print(a, end=' ')
3435
a, b = b, a+b
3536
print()
3637

37-
def fib2(n): # return Fibonacci series up to n
38+
def fib2(n):
39+
"""Return Fibonacci series up to n."""
3840
result = []
3941
a, b = 0, 1
4042
while a < n:

0 commit comments

Comments
 (0)