[issue11676] imp.load_module and submodules - doc issue, or bug?

2011-03-29 Thread Brett Cannon
Brett Cannon added the comment: It's actually not surprising that imp works this way: it predates packages. Because the semantics (I assume) have been like this for ages I say we document the current behavior (it's easy to work around) and simply continue to replace imp functionality with imp

[issue11676] imp.load_module and submodules - doc issue, or bug?

2011-03-28 Thread Andreas Stührk
Changes by Andreas Stührk : -- nosy: +Trundle ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue11676] imp.load_module and submodules - doc issue, or bug?

2011-03-28 Thread Dave Peck
Dave Peck added the comment: Definitely could agree with this assessment, but it is surprising given the lack of parallel behavior between 'import' and 'imp'. Note that imp.load_module(subpackage) _does_ modify the parent module's attributes -- but it will never put the subpackage attribute i

[issue11676] imp.load_module and submodules - doc issue, or bug?

2011-03-28 Thread Brett Cannon
Brett Cannon added the comment: I say it's a documentation bug. -- assignee: -> docs@python components: +Documentation -Interpreter Core, Library (Lib) nosy: +brett.cannon, docs@python stage: -> needs patch ___ Python tracker

[issue11676] imp.load_module and submodules - doc issue, or bug?

2011-03-25 Thread Dave Peck
New submission from Dave Peck : 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