Message3450

Author nriley
Recipients nriley, wesleys
Date 2008-08-27.03:13:25
SpamBayes Score 3.260514e-11
Marked as misclassified No
Message-id <1219806807.57.0.310632845958.issue1111@psf.upfronthosting.co.za>
In-reply-to
Content
You can work around this bug (in ImportFunction.__call__) by using positional 
rather than keyword arguments.  Pass {} for globals and locals in order to get 
to fromlist.

The function doesn't verify the number of positional arguments it's passed, 
either:

Jython trunk:
>>> __import__('sys', {}, {}, [], 1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
<module 'sys' (built-in)>

Python 2.5:
>>> __import__('sys', {}, {}, [], 1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: __import__() takes at most 5 arguments (14 given)
History
Date User Action Args
2008-08-27 03:13:27nrileysetmessageid: <1219806807.57.0.310632845958.issue1111@psf.upfronthosting.co.za>
2008-08-27 03:13:27nrileysetrecipients: + nriley, wesleys
2008-08-27 03:13:27nrileylinkissue1111 messages
2008-08-27 03:13:26nrileycreate