[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 useful but not obvious features of the language.

> On Sep 13, 2017, at 12:15 PM, Mariatta Wijaya  wrote:
> 
> 
> 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 module
> ```
> 
> Wording is somewhat different in Python 2.7 docs, but it's there: 
> https://docs.python.org/2.7/reference/simple_stmts.html#the-import-statement
> 
> Thanks.
> 
> --
> nosy: +Mariatta
> resolution:  -> not a bug
> stage:  -> resolved
> status: open -> closed
> 
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 documented that you would expect it to be?  
> Because 'import' 'as' is certainly documented.
> 
> --
> nosy: +r.david.murray
> 
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 module
```

Wording is somewhat different in Python 2.7 docs, but it's there: 
https://docs.python.org/2.7/reference/simple_stmts.html#the-import-statement

Thanks.

--
nosy: +Mariatta
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: docs@python
components: Documentation
messages: 302083
nosy: docs@python, svenyonson
priority: normal
severity: normal
status: open
title: Include "import as" in documentation
type: enhancement
versions: Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com