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.

Author Dave Peck
Recipients Dave Peck
Date 2011-03-25.21:40:26
SpamBayes Score 0.00042043897
Marked as misclassified No
Message-id <1301089227.12.0.157951103986.issue11676@psf.upfronthosting.co.za>
In-reply-to
Content
If you use `import` to load a package and subpackage:

    import package
    import package.subpackage
  
Then the `package` module instance will contain a `subpackage` attribute:

    assert "subpackage" in dir(sys.modules['package']), "This works."
  
But if you use Python's `imp` module to import these packages instead, the same assertion will fail.

Is this a python documentation oversight, or a bug with the `imp` module? 

To reproduce, clone the associated hg repro and follow the instructions in the README file. Thanks!
History
Date User Action Args
2011-03-25 21:40:27Dave Pecksetrecipients: + Dave Peck
2011-03-25 21:40:27Dave Pecksetmessageid: <1301089227.12.0.157951103986.issue11676@psf.upfronthosting.co.za>
2011-03-25 21:40:26Dave Pecklinkissue11676 messages
2011-03-25 21:40:26Dave Peckcreate