Skip to content

Commit

Permalink
[3.13] pythongh-125383: Update fib function comment for accuracy (p…
Browse files Browse the repository at this point in the history
…ythonGH-125386) (python#125395)

pythongh-125383: Update `fib` function comment for accuracy (pythonGH-125386)

`Doc/tutorial/controlflow.rst`: fix comment for `fib` function
(cherry picked from commit 283ea5f)

Co-authored-by: Wulian <xiguawulian@gmail.com>
  • Loading branch information
miss-islington and Wulian233 authored Oct 13, 2024
1 parent b7dff85 commit c9ead96
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Doc/tutorial/controlflow.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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=' ')
Expand Down

0 comments on commit c9ead96

Please sign in to comment.