diff Python/bltinmodule.c @ 76303:2dd046be2c88

Issue #2377: Make importlib the implementation of __import__(). importlib._bootstrap is now frozen into Python/importlib.h and stored as _frozen_importlib in sys.modules. Py_Initialize() loads the frozen code along with sys and imp and then uses _frozen_importlib._install() to set builtins.__import__() w/ _frozen_importlib.__import__().
author Brett Cannon <brett@python.org>
date Sat, 14 Apr 2012 14:10:13 -0400
parents 4ff234337e24
children 56650edb95a2
line wrap: on
line diff
--- a/Python/bltinmodule.c	Sat Apr 14 16:01:49 2012 +0200
+++ b/Python/bltinmodule.c	Sat Apr 14 14:10:13 2012 -0400
@@ -187,7 +187,7 @@
     static char *kwlist[] = {"name", "globals", "locals", "fromlist",
                              "level", 0};
     PyObject *name, *globals = NULL, *locals = NULL, *fromlist = NULL;
-    int level = -1;
+    int level = 0;
 
     if (!PyArg_ParseTupleAndKeywords(args, kwds, "U|OOOi:__import__",
                     kwlist, &name, &globals, &locals, &fromlist, &level))