[New-bugs-announce] [issue22514] incomplete programming example on python.org
Friedrich Spee von Langenfeld
report at bugs.python.org
Mon Sep 29 21:22:10 CEST 2014
New submission from Friedrich Spee von Langenfeld:
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?
----------
messages: 227818
nosy: Friedrich.Spee.von.Langenfeld
priority: normal
severity: normal
status: open
title: incomplete programming example on python.org
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22514>
_______________________________________
More information about the New-bugs-announce
mailing list