New submission from Juan <juanbai...@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/e74bd48bbef1040afb01b107e6cfbc3c1e991be24c10c40a37e335383e54/Fibo-1.0.0.tar.gz 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 <rep...@bugs.python.org> <https://bugs.python.org/issue35655> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com