[docs] [issue19250] Duplicate import documentation in py3k

Nick Guenther report at bugs.python.org
Sun Oct 13 21:40:35 CEST 2013


New submission from Nick Guenther:

Python3's docs given by
>> help("import")

duplicate these two paragraphs:
"The *public names* defined by a module are determined by checking the
module's namespace for a variable named ``__all__``; if defined, it
must be a sequence of strings which are names defined or imported by
that module.  The names given in ``__all__`` are all considered public
and are required to exist.  If ``__all__`` is not defined, the set of
public names includes all names found in the module's namespace which
do not begin with an underscore character (``'_'``).  ``__all__``
should contain the entire public API. It is intended to avoid
accidentally exporting items that are not part of the API (such as
library modules which were imported and used within the module).

The ``from`` form with ``*`` may only occur in a module scope.
Attempting to use it in class or function definitions will raise a
``SyntaxError``."

(full output attached for proof)

Digging through the sources, I can't find where this is defined. The python2 on my system has the same two paragraphs but they are *not* duplicated there, and in the sources, which admittedly I don't know my way around, Doc/reference/simple_stmts.rst contains these paragraphs but only once each, and grep seems to imply this is the source of them.

Did sphinx screw up somewhere between your hg and my distro mirror?

Here's my version info (arch linux, 64 bit)
[kousu at galleon ~]$ pacman -Qi python
Name           : python
Version        : 3.3.2-2
Description    : Next generation of the python high-level scripting language
Architecture   : x86_64
URL            : http://www.python.org/
Licenses       : custom
Groups         : None
Provides       : python3
Depends On     : expat  bzip2  gdbm  openssl  libffi  zlib
Optional Deps  : tk: for tkinter [installed]
                 sqlite [installed]
Required By    : cython  ipython  ktoblzcheck  libreoffice-common  python-cairo  python-dateutil  python-dbus  python-markupsafe
                 python-numpy  python-pyparsing  python-pytz  python-pyzmq  python-setuptools  python-sip  python-six  python-sympy
                 python-tornado  python-xdg  ranger  youtube-dl
Optional For   : systemd
Conflicts With : None
Replaces       : python3
Installed Size : 86980.00 KiB
Packager       : Bart
Build Date     : Fri Sep 6 03:31:57 2013
Install Date   : Tue Sep 17 10:29:36 2013
Install Reason : Installed as a dependency for another package
Install Script : No
Validated By   : Signature

----------
assignee: docs at python
components: Documentation
files: The ``import`` statement - (2013-10-13 15:36:07)
messages: 199775
nosy: docs at python, kousu
priority: normal
severity: normal
status: open
title: Duplicate import documentation in py3k
versions: Python 3.3
Added file: http://bugs.python.org/file32096/The ``import`` statement - (2013-10-13 15:36:07)

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19250>
_______________________________________


More information about the docs mailing list