classification
Title: incomplete programming example on python.org
Type: Stage:
Components: Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Friedrich.Spee.von.Langenfeld, benjamin.peterson
Priority: normal Keywords:

Created on 2014-09-29 19:22 by Friedrich.Spee.von.Langenfeld, last changed 2014-09-29 19:50 by benjamin.peterson. This issue is now closed.

Messages (2)
msg227818 - (view) Author: Friedrich Spee von Langenfeld (Friedrich.Spee.von.Langenfeld) Date: 2014-09-29 19:22
When I open www.python.org, there are some examples to demonstrate the "look and feel" of Python. I´ve tested an example (example number 1). Online, the following is shown:
# Python 3: Fibonacci series up to n
>>> def fib(n):
>>>     a, b = 0, 1
>>>     while a < n:
>>>         print(a, end=' ')
>>>         a, b = b, a+b
>>>     print()
>>> fib(1000)
0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610

But then I have tested the (following) code with Python 3.1:
>>> def fib(n):
	 a, b = 0, 1
	 while a < n:
 		print(a, end=" ")
		a, b = b, a+b
 	 print()
	

>>> fib(1000)
0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987

As you can see, the last number(987)wasn´t shown online. Perhaps, this behavior is browser-dependent. I´ve used Mozilla Firefox 32.0.3 .
I can´t estimate the priority of this issue, because I can´t imagine how many people are using or analysing the examples. Can you reproduce my findings?
msg227821 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2014-09-29 19:50
987 is indeed missing.
History
Date User Action Args
2014-09-29 19:50:58benjamin.petersonsetstatus: open -> closed

nosy: + benjamin.peterson
messages: + msg227821

resolution: fixed
2014-09-29 19:22:10Friedrich.Spee.von.Langenfeldcreate