[issue17938] Duplicate text in docs/reference/import statement
New submission from Stefan Chrobot: http://docs.python.org/3/reference/simple_stmts.html#the-import-statement After the "Examples", there's a duplicated paragraph: 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. 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. The wild card form of import — import * — is only allowed at the module level. Attempting to use it in class or function definitions will raise a SyntaxError. -- assignee: docs@python components: Documentation messages: 188737 nosy: docs@python, stefanchrobot priority: normal severity: normal status: open title: Duplicate text in docs/reference/import statement type: enhancement versions: Python 3.3 ___ Python tracker <http://bugs.python.org/issue17938> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17939] Misleading information about slice assignment in docs
New submission from Stefan Chrobot: http://docs.python.org/3/reference/simple_stmts.html#assignment-statements The docs says: "If the target is a slicing: The primary expression in the reference is evaluated. It should yield a mutable sequence object (such as a list). The assigned object should be a sequence object of the same type." This seems wrong, because the assigned object can be any iterable: a = [4, 5, 6] a[0:0] = range(1, 4) # a is now [1, 2, 3, 4, 5, 6] -- assignee: docs@python components: Documentation messages: 188738 nosy: docs@python, stefanchrobot priority: normal severity: normal status: open title: Misleading information about slice assignment in docs type: enhancement versions: Python 3.3 ___ Python tracker <http://bugs.python.org/issue17939> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com