mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
call __import__() with 4 args instead of 1
This commit is contained in:
parent
becdbec806
commit
24c137432c
2 changed files with 56 additions and 2 deletions
|
@ -47,8 +47,12 @@ builtin___import__(self, args)
|
|||
object *args;
|
||||
{
|
||||
char *name;
|
||||
object *globals = NULL;
|
||||
object *locals = NULL;
|
||||
object *fromlist = NULL;
|
||||
|
||||
if (!newgetargs(args, "s:__import__", &name))
|
||||
if (!newgetargs(args, "s|OOO:__import__",
|
||||
&name, &globals, &locals, &fromlist))
|
||||
return NULL;
|
||||
return import_module(name);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue