]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-125383: Update `fib` function comment for accuracy (#125386)
authorWulian <xiguawulian@gmail.com>
Sun, 13 Oct 2024 11:10:59 +0000 (19:10 +0800)
committerGitHub <noreply@github.com>
Sun, 13 Oct 2024 11:10:59 +0000 (14:10 +0300)
`Doc/tutorial/controlflow.rst`: fix comment for `fib` function

Doc/tutorial/controlflow.rst

index 9b73ac475c78d5d43972271bfe0fe40d95a02865..b830ce94ba4f47551d5353bdaebcca1f5fd2d94a 100644 (file)
@@ -461,8 +461,8 @@ Defining Functions
 We can create a function that writes the Fibonacci series to an arbitrary
 boundary::
 
-   >>> def fib(n):    # write Fibonacci series up to n
-   ...     """Print a Fibonacci series up to n."""
+   >>> def fib(n):    # write Fibonacci series less than n
+   ...     """Print a Fibonacci series less than n."""
    ...     a, b = 0, 1
    ...     while a < n:
    ...         print(a, end=' ')