https://github.com/python/cpython/commit/23552b3d8f5964178f37f6cc6660154521d12c53
commit: 23552b3d8f5964178f37f6cc6660154521d12c53
branch: 3.14
author: Miss Islington (bot) <31488909+miss-isling...@users.noreply.github.com>
committer: vstinner <vstin...@python.org>
date: 2025-06-06T13:22:50Z
summary:

[3.14] feat(docs): type fix - apply pep8 by using docstring instead of comment 
in the doc. (GH-135181) (#135212)

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 343182853f19a42c0ba8980d3104076a8c7bcfe7)

Co-authored-by: Jean-Louis GUENEGO <jlguen...@gmail.com>

files:
M Doc/tutorial/modules.rst

diff --git a/Doc/tutorial/modules.rst b/Doc/tutorial/modules.rst
index de7aa0e2342946..47bf7547b4ae1d 100644
--- a/Doc/tutorial/modules.rst
+++ b/Doc/tutorial/modules.rst
@@ -27,14 +27,16 @@ called :file:`fibo.py` in the current directory with the 
following contents::
 
    # Fibonacci numbers module
 
-   def fib(n):    # write Fibonacci series up to n
+   def fib(n):
+       """Write Fibonacci series up to n."""
        a, b = 0, 1
        while a < n:
            print(a, end=' ')
            a, b = b, a+b
        print()
 
-   def fib2(n):   # return Fibonacci series up to n
+   def fib2(n):
+       """Return Fibonacci series up to n."""
        result = []
        a, b = 0, 1
        while a < n:

_______________________________________________
Python-checkins mailing list -- python-checkins@python.org
To unsubscribe send an email to python-checkins-le...@python.org
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: arch...@mail-archive.com

Reply via email to