Message3065

Author tristan
Recipients tristan
Date 2008-03-07.04:42:18
SpamBayes Score 0.11508215
Marked as misclassified No
Message-id <1204864939.12.0.0190298945505.issue1006@psf.upfronthosting.co.za>
In-reply-to
Content
when using __import__ with a fromlist, the modules in fromlist should be
added to the imported module's __dict__. It doesn't.

Example:

$ mkdir a
$ mkdir a/b
$ mkdir a/b/c
$ touch a/__init__.py
$ touch a/b/__init__.py
$ touch a/b/c/__init__.py
$ python -c "print __import__('a.b', {}, {}, ('c',)).c"
<module 'a.b.c' from 'a/b/c/__init__.pyc'>
tristan@quiver:~/projects/tmp/test$ jython -c "print __import__('a.b',
{}, {}, ('c',)).c"
Traceback (innermost last):
  File "<string>", line 1, in ?
AttributeError: 'module' object has no attribute 'c'
History
Date User Action Args
2008-03-07 04:42:19tristansetspambayes_score: 0.115082 -> 0.11508215
recipients: + tristan
2008-03-07 04:42:19tristansetspambayes_score: 0.115082 -> 0.115082
messageid: <1204864939.12.0.0190298945505.issue1006@psf.upfronthosting.co.za>
2008-03-07 04:42:18tristanlinkissue1006 messages
2008-03-07 04:42:18tristancreate