This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: minor documentation fix for '__import__'
Type: Stage: resolved
Components: Documentation Versions: Python 3.8, Python 3.7, Python 3.6, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Mariatta, Qian Yun, docs@python, matrixise
Priority: normal Keywords: needs review, patch

Created on 2018-01-26 06:41 by Qian Yun, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 5339 merged Qian Yun, 2018-01-26 06:47
PR 5488 merged miss-islington, 2018-02-02 04:20
PR 5489 merged miss-islington, 2018-02-02 04:21
PR 5494 merged Mariatta, 2018-02-02 13:30
Messages (8)
msg310741 - (view) Author: Qian Yun (Qian Yun) * Date: 2018-01-26 06:41
This is a minor documentation for builtin function '__import__'.
msg310742 - (view) Author: Stéphane Wirtel (matrixise) * (Python committer) Date: 2018-01-26 06:46
minor documentation?

I don't understand, the documentation of __import__ is well done, could you explain ?

https://docs.python.org/3/library/functions.html#__import__

thank you
msg310743 - (view) Author: Qian Yun (Qian Yun) * Date: 2018-01-26 07:00
Sorry, a typo, it's "minor documentation fix".

See https://github.com/python/cpython/pull/5339

diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index d8971bef2a..80b4f9447c 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -317,7 +317,7 @@ PyDoc_STRVAR(import_doc,
 "__import__(name, globals=None, locals=None, fromlist=(), level=0) -> module\n\
 \n\
 Import a module. Because this function is meant for use by the Python\n\
-interpreter and not for general use it is better to use\n\
+interpreter and not for general use, it is better to use\n\
 importlib.import_module() to programmatically import a module.\n\
 \n\
 The globals argument is only used to determine the context;\n\
@@ -326,8 +326,8 @@ should be a list of names to emulate ``from name import ...'', or an\n\
 empty list to emulate ``import name''.\n\
 When importing a module from a package, note that __import__('A.B', ...)\n\
 returns package A when fromlist is empty, but its submodule B when\n\
-fromlist is not empty.  Level is used to determine whether to perform \n\
-absolute or relative imports. 0 is absolute while a positive number\n\
+fromlist is not empty.  The level argument is used to determine whether to\n\
+perform absolute or relative imports, 0 is absolute while a positive number\n\
 is the number of parent directories to search relative to the current module.");
msg310745 - (view) Author: Stéphane Wirtel (matrixise) * (Python committer) Date: 2018-01-26 07:16
Don't worry, but in fact, I did not understand because when you post
your issue, there was no associated PR.

Now, I do understand.

Thank you
msg311474 - (view) Author: Mariatta (Mariatta) * (Python committer) Date: 2018-02-02 04:20
New changeset 461d225b195eec5269f317323b41115516144c41 by Mariatta (oldk) in branch 'master':
bpo-32674: Improve the docstring for __import__ (GH-5339)
https://github.com/python/cpython/commit/461d225b195eec5269f317323b41115516144c41
msg311489 - (view) Author: Mariatta (Mariatta) * (Python committer) Date: 2018-02-02 13:32
New changeset f61951b10cc08d3926a3ebaacc154d4149150ef4 by Mariatta (Miss Islington (bot)) in branch '3.6':
bpo-32674: Improve the docstring for __import__ (GH-5339) (GH-5489)
https://github.com/python/cpython/commit/f61951b10cc08d3926a3ebaacc154d4149150ef4
msg311503 - (view) Author: Mariatta (Mariatta) * (Python committer) Date: 2018-02-02 16:24
New changeset 9b7b3a64560269188fcb43445becc5aacb4de2dc by Mariatta in branch '2.7':
bpo-32674: Improve the docstring for __import__ (GH-5339) (GH-5494)
https://github.com/python/cpython/commit/9b7b3a64560269188fcb43445becc5aacb4de2dc
msg311504 - (view) Author: Mariatta (Mariatta) * (Python committer) Date: 2018-02-02 16:25
Thanks!
History
Date User Action Args
2022-04-11 14:58:57adminsetgithub: 76855
2018-02-02 16:25:38Mariattasetstatus: open -> closed
versions: + Python 2.7, Python 3.6, Python 3.8
messages: + msg311504

resolution: fixed
stage: patch review -> resolved
2018-02-02 16:24:00Mariattasetmessages: + msg311503
2018-02-02 13:32:21Mariattasetmessages: + msg311489
2018-02-02 13:30:43Mariattasetpull_requests: + pull_request5327
2018-02-02 04:21:11miss-islingtonsetpull_requests: + pull_request5319
2018-02-02 04:20:21miss-islingtonsetpull_requests: + pull_request5318
2018-02-02 04:20:02Mariattasetnosy: + Mariatta
messages: + msg311474
2018-02-01 10:08:48matrixisesetkeywords: + needs review
2018-01-26 07:16:47matrixisesetmessages: + msg310745
2018-01-26 07:00:14Qian Yunsetmessages: + msg310743
2018-01-26 06:47:53Qian Yunsetkeywords: + patch
stage: patch review
pull_requests: + pull_request5186
2018-01-26 06:46:51matrixisesetnosy: + matrixise
messages: + msg310742
2018-01-26 06:41:42Qian Yuncreate