Title: Python package support not properly documented
Type: Stage:
Components: Documentation Versions:
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: araneidae, collinwinter, georg.brandl
Priority: normal Keywords:

Created on 2007-05-15 16:39 by araneidae, last changed 2009-04-29 07:03 by georg.brandl. This issue is now closed.

Messages (6)
msg32009 - (view) Author: Michael Abbott (araneidae) Date: 2007-05-15 16:39
I can sum this report up most simply by quoting the message below:

Note that this message was posted 5 1/2 years ago (by myself, as it happens), had no follow up, and the problem referred to remains current!  (The chapter on "import" is now section 6.12: nothing else has changed.)

The comment below that "presum[ably] nothing significant has changed" seems less than probable now!

I was looking to understand modules and packages a bit better: they don't behave like proper first class objects (is module.sub_module an attribute?  not really), and so the lack of definitive documentation in this area is sad, particularly after such a long time.

Body of original message follows

Package support in Python 2

Michael Abbott michael at
Wed Oct 3 10:58:08 CEST 2001

Is there up to date documentation for package support in Python 2?

Section 6.11 of the "Python Reference Manual" has the following nice quote:

[XXX Can't be bothered to spell this out right now; see the URL for more details, also about how the module search works from inside a package.] 

and the referred URL documents Python 1.5.  I presume that nothing significant has changed recently, but it's certainly disconcerting for something as fundamental as module importing to not actually be part of the core language documentation!
msg32010 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2007-05-15 20:41
You are certainly right that this should be documented properly.

BTW, after you import x.y, y is an attribute of module x. When you write "", Python knows nothing about modules any more, it just handles attribute access of arbitrary objects which happen to be modules.
msg32011 - (view) Author: Collin Winter (collinwinter) * (Python committer) Date: 2007-06-05 18:35
Hi Michael, would you be interested in working on a docs patch for this?
msg32012 - (view) Author: Michael Abbott (araneidae) Date: 2007-06-05 21:46
Hi Collin,

Well, that's not a terrible idea.  I'll take a look and follow up later.
msg60227 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-01-19 20:36
Any progress on this?
msg86778 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2009-04-29 07:03
This has now been done by Brett while he wrote the docs for importlib.
Date User Action Args
2009-04-29 07:03:48georg.brandlsetstatus: pending -> closed
resolution: remind -> fixed
messages: + msg86778
2008-01-19 20:36:52georg.brandlsetmessages: + msg60227
2007-09-20 17:32:51jafosetstatus: open -> pending
priority: high -> normal
resolution: remind
2007-05-15 16:39:34araneidaecreate