Message132162
| 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:27 | Dave Peck | set | recipients:
+ Dave Peck |
| 2011年03月25日 21:40:27 | Dave Peck | set | messageid: <1301089227.12.0.157951103986.issue11676@psf.upfronthosting.co.za> |
| 2011年03月25日 21:40:26 | Dave Peck | link | issue11676 messages |
| 2011年03月25日 21:40:26 | Dave Peck | create |
|