[issue31454] Include "import as" in documentation

2017-09-14 Thread Steve Johnson
Steve Johnson added the comment: My suggestion was to include this in the 2.7 tutorial, section 6 (modules) where the various syntax is described for import. Most of us don't dig into the reference until we are trying to find something specific. The tutorial is an excellent place to introduce

[issue31454] Include "import as" in documentation

2017-09-14 Thread Steve Johnson
Steve Johnson added the comment: In the 2.7 Tutorial, section 6, modules, where it describes the various syntax for using import. > On Sep 13, 2017, at 10:42 AM, R. David Murray wrote: > > > R. David Murray added the comment: > > Where do you find that it is not

[issue31454] Include "import as" in documentation

2017-09-13 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: import as is documented, so I'm closing this unless you have other concerns. Python 3 docs: https://docs.python.org/3/reference/simple_stmts.html#import ``` If the module name is followed by as, then the name following as is bound directly to the imported

[issue31454] Include "import as" in documentation

2017-09-13 Thread R. David Murray
R. David Murray added the comment: Where do you find that it is not documented that you would expect it to be? Because 'import' 'as' is certainly documented. -- nosy: +r.david.murray ___ Python tracker

[issue31454] Include "import as" in documentation

2017-09-13 Thread Steve Johnson
New submission from Steve Johnson: I was wondering if you could do something like fiblib = import fibo or import fibo as fiblib, and low and behold, the "as" variant worked. I find this very useful, and thought it should be part of your documentation on "import" -- assignee: