From: Wulian Date: Sun, 13 Oct 2024 11:10:59 +0000 (+0800) Subject: gh-125383: Update `fib` function comment for accuracy (#125386) X-Git-Tag: v3.14.0a1~51 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=283ea5f3b2b6a18605b8598a979afe263b0f21ce;p=thirdparty%2FPython%2Fcpython.git gh-125383: Update `fib` function comment for accuracy (#125386) `Doc/tutorial/controlflow.rst`: fix comment for `fib` function --- diff --git a/Doc/tutorial/controlflow.rst b/Doc/tutorial/controlflow.rst index 9b73ac475c78..b830ce94ba4f 100644 --- a/Doc/tutorial/controlflow.rst +++ b/Doc/tutorial/controlflow.rst @@ -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=' ')