diff options
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/exceptions.c | 2 | ||||
-rw-r--r-- | Objects/listobject.c | 2 | ||||
-rw-r--r-- | Objects/typeobject.c | 6 |
3 files changed, 5 insertions, 5 deletions
diff --git a/Objects/exceptions.c b/Objects/exceptions.c index e26c350..14e1bfb 100644 --- a/Objects/exceptions.c +++ b/Objects/exceptions.c @@ -1849,7 +1849,7 @@ _PyExc_Init(void) PRE_INIT(UnicodeWarning) PRE_INIT(BytesWarning) - bltinmod = PyImport_ImportModule("__builtin__"); + bltinmod = PyImport_ImportModule("builtins"); if (bltinmod == NULL) Py_FatalError("exceptions bootstrapping error."); bdict = PyModule_GetDict(bltinmod); diff --git a/Objects/listobject.c b/Objects/listobject.c index ea10abf..01ada08 100644 --- a/Objects/listobject.c +++ b/Objects/listobject.c @@ -1961,7 +1961,7 @@ is_default_cmp(PyObject *cmpfunc) module = PyUnicode_AsString(f->m_module); if (module == NULL) return 0; - if (strcmp(module, "__builtin__") != 0) + if (strcmp(module, "builtins") != 0) return 0; if (strcmp(f->m_ml->ml_name, "cmp") != 0) return 0; diff --git a/Objects/typeobject.c b/Objects/typeobject.c index fd6f5ce..99ba799 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -112,7 +112,7 @@ type_module(PyTypeObject *type, void *context) if (s != NULL) return PyUnicode_FromStringAndSize( type->tp_name, (Py_ssize_t)(s - type->tp_name)); - return PyUnicode_FromString("__builtin__"); + return PyUnicode_FromString("builtins"); } } @@ -397,7 +397,7 @@ type_repr(PyTypeObject *type) else kind = "type"; - if (mod != NULL && PyUnicode_CompareWithASCIIString(mod, "__builtin__")) + if (mod != NULL && PyUnicode_CompareWithASCIIString(mod, "builtins")) rtn = PyUnicode_FromFormat("<%s '%U.%U'>", kind, mod, name); else rtn = PyUnicode_FromFormat("<%s '%s'>", kind, type->tp_name); @@ -2455,7 +2455,7 @@ object_repr(PyObject *self) name = type_name(type, NULL); if (name == NULL) return NULL; - if (mod != NULL && PyUnicode_CompareWithASCIIString(mod, "__builtin__")) + if (mod != NULL && PyUnicode_CompareWithASCIIString(mod, "builtins")) rtn = PyUnicode_FromFormat("<%U.%U object at %p>", mod, name, self); else rtn = PyUnicode_FromFormat("<%s object at %p>", |