[Python-checkins] gh-87304: Improve comments in language reference for imports (#92164)

JelleZijlstra webhook-mailer at python.org
Tue May 3 18:08:12 EDT 2022


https://github.com/python/cpython/commit/ee2205b208389611e8a278ac1bc74b34f4994fd2
commit: ee2205b208389611e8a278ac1bc74b34f4994fd2
branch: main
author: Robert Yang <35813883+robert861212 at users.noreply.github.com>
committer: JelleZijlstra <jelle.zijlstra at gmail.com>
date: 2022-05-03T16:08:05-06:00
summary:

gh-87304: Improve comments in language reference for imports (#92164)

files:
M Doc/reference/simple_stmts.rst

diff --git a/Doc/reference/simple_stmts.rst b/Doc/reference/simple_stmts.rst
index 5f19a3822ba9f..8311de0457f6a 100644
--- a/Doc/reference/simple_stmts.rst
+++ b/Doc/reference/simple_stmts.rst
@@ -801,9 +801,9 @@ The :keyword:`from` form uses a slightly more complex process:
 Examples::
 
    import foo                 # foo imported and bound locally
-   import foo.bar.baz         # foo.bar.baz imported, foo bound locally
-   import foo.bar.baz as fbb  # foo.bar.baz imported and bound as fbb
-   from foo.bar import baz    # foo.bar.baz imported and bound as baz
+   import foo.bar.baz         # foo, foo.bar, and foo.bar.baz imported, foo bound locally
+   import foo.bar.baz as fbb  # foo, foo.bar, and foo.bar.baz imported, foo.bar.baz bound as fbb
+   from foo.bar import baz    # foo, foo.bar, and foo.bar.baz imported, foo.bar.baz bound as baz
    from foo import attr       # foo imported and foo.attr bound as attr
 
 .. index:: single: * (asterisk); import statement



More information about the Python-checkins mailing list