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: refman: importing x.y.z as m is possible, docs say otherwise
Type: Stage:
Components: Documentation Versions: Python 2.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: blunck2, loewis, zephyrfalcon
Priority: normal Keywords:

Created on 2003-01-01 20:33 by zephyrfalcon, last changed 2022-04-10 16:06 by admin. This issue is now closed.

Messages (3)
msg13782 - (view) Author: Hans Nowak (zephyrfalcon) Date: 2003-01-01 20:33
In the reference manual, the 'import' documentation
(Doc/ref/import.html) claims:

"To avoid confusion, you cannot import modules with
dotted names as a different local name. So import
module as m is legal, but import module.submod as s is
not."

This doesn't seem to be true (anymore?):

[Python 2.2.2]
>>> import xml.dom.minidom as m
>>> m
<module 'xml.dom.minidom' from
'C:\Python22\lib\xml\dom\minidom.pyc'>

[Python 2.3]
>>> import xml.dom.minidom as m
>>> m
<module 'xml.dom.minidom' from
'C:\Python22\lib\xml\dom\minidom.pyc'>
msg13783 - (view) Author: Christopher Blunck (blunck2) Date: 2003-01-05 03:08
Logged In: YES 
user_id=531881

see patch 662454
msg13784 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2003-01-16 11:33
Logged In: YES 
user_id=21627

This is now fixed in ref6.tex 1.60.
History
Date User Action Args
2022-04-10 16:06:05adminsetgithub: 37680
2003-01-01 20:33:39zephyrfalconcreate