[issue31757] Tutorial: Fibonacci numbers start with 1, 1

2017-10-14 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue31757] Tutorial: Fibonacci numbers start with 1, 1

2017-10-14 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 8c26a34f93db7ae96b42bcce6b557437436c7721 by Raymond Hettinger in branch 'master': bpo-31757: Make Fibonacci examples consistent (#3991) https://github.com/python/cpython/commit/8c26a34f93db7ae96b42bcce6b557437436c7721 -- ___

[issue31757] Tutorial: Fibonacci numbers start with 1, 1

2017-10-13 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch pull_requests: +3967 stage: -> patch review ___ Python tracker ___ ___ Python-bugs

[issue31757] Tutorial: Fibonacci numbers start with 1, 1

2017-10-13 Thread Raymond Hettinger
Raymond Hettinger added the comment: I update the example in "First Steps Towards Programming" to match the one in "Defining Functions" (which is also shown on the home page at www.python.org. -- ___ Python tracker

[issue31757] Tutorial: Fibonacci numbers start with 1, 1

2017-10-13 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: docs@python -> rhettinger nosy: +rhettinger versions: +Python 3.7 -Python 3.6 ___ Python tracker ___ _

[issue31757] Tutorial: Fibonacci numbers start with 1, 1

2017-10-13 Thread Terry J. Reedy
Terry J. Reedy added the comment: I agree that we should be consistent -- with the current standard definition -- with the changes suggested above. Heinrich, can you, and do you want to, submit a patch? If so, please also sign the contributor agreement. See https://www.python.org/psf/contr

[issue31757] Tutorial: Fibonacci numbers start with 1, 1

2017-10-11 Thread Steven D'Aprano
Change by Steven D'Aprano : -- nosy: +steven.daprano ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue31757] Tutorial: Fibonacci numbers start with 1, 1

2017-10-11 Thread Mark Dickinson
Mark Dickinson added the comment: I agree it would be good to be consistent. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue31757] Tutorial: Fibonacci numbers start with 1, 1

2017-10-11 Thread Heinrich Schnermann
Heinrich Schnermann added the comment: I would not insist of starting with 1 instead of 0 (I follow your arguments here), but perhaps it would be nice if it would behave the same way in both chapters. The first fibonacci number examples in https://docs.python.org/3/tutorial/introduction.html#

[issue31757] Tutorial: Fibonacci numbers start with 1, 1

2017-10-11 Thread Mark Dickinson
Mark Dickinson added the comment: A nice response to the question of whether to start with 0 or 1 here: https://stackoverflow.com/a/5901955 > The definition with Fib(0) = 1 is known as the combinatorial > definition, and Fib(0) = 0 is the classical definition. Both > are used in the Fibonacci

[issue31757] Tutorial: Fibonacci numbers start with 1, 1

2017-10-11 Thread Mark Dickinson
Mark Dickinson added the comment: Is there any particular reason you want to start with 1? While not universal, it's standard to define `Fib(0) = 0`, and to start the sequence at `0`. (And note that Python usually starts indexing things from 0, so it makes sense to start with `Fib(0)` rather

[issue31757] Tutorial: Fibonacci numbers start with 1, 1

2017-10-11 Thread Heinrich Schnermann
New submission from Heinrich Schnermann : In https://docs.python.org/3/tutorial/controlflow.html#defining-functions both examples produce fibonacci numbers starting with 0. They should start with 1, as in the example in https://docs.python.org/3/tutorial/introduction.html#first-steps-towards-p