[issue35655] documentation have wrong info about fibo module examples
![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
New submission from Juan <juanbaio10@gmail.com>: The below sections in modules documentation have wrong information about fibo module: 6. Modules 6.1. More on Modules 6.1.1. Executing modules as scripts 6.3. The dir() Function The name of module is Fibo not fibo and the attributes are fab,fab2 not fib,fib2. root@archlinux ~]# python2 --version Python 2.7.15 [root@archlinux ~]# pip2 --version pip 18.1 from /usr/lib/python2.7/site-packages/pip (python 2.7) [root@archlinux ~]# pip2 install fibo Collecting fibo Using cached https://files.pythonhosted.org/packages/24/50/e74bd48bbef1040afb01b107e6cfbc... Installing collected packages: fibo Running setup.py install for fibo ... done Successfully installed fibo-1.0.0 [root@archlinux ~]# pip2 list modules |grep -i fibo Fibo 1.0.0 [root@archlinux ~]# python2 Python 2.7.15 (default, Jun 27 2018, 13:05:28) [GCC 8.1.1 20180531] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import fibo Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named fibo import Fibo Fibo.fib(10) Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'module' object has no attribute 'fib' Fibo.fib2(10) Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'module' object has no attribute 'fib2' Fibo.fab(10) 1 1 2 3 5 8 13 21 34 55 Fibo.fab2(10) [1, 1, 2, 3, 5, 8, 13, 21, 34, 55] Fibo.__name__ 'Fibo' dir(Fibo) ['Fab', '__builtins__', '__doc__', '__file__', '__name__', '__package__', 'fab', 'fab2', 'fab4']
---------- assignee: docs@python components: Documentation messages: 332967 nosy: docs@python, eric.araujo, ezio.melotti, juanbaio10, mdk, willingc priority: normal severity: normal status: open title: documentation have wrong info about fibo module examples type: enhancement versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue35655> _______________________________________
![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
Christian Heimes <lists@cheimes.de> added the comment: The documentation examples are not based on the 3rd party Fibo Python package. All examples are based on the short script https://docs.python.org/3/tutorial/modules.html?highlight=fibo#modules : For instance, use your favorite text editor to create a file called fibo.py in the current directory with the following contents ---------- nosy: +christian.heimes resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue35655> _______________________________________
participants (2)
-
Christian Heimes
-
Juan