Mercurial > cpython-lru_cache-weakref
comparison Python/pythonrun.c @ 40949:e759fd8d95ae
Remove the exceptions builtin module, all the exceptions are already builtin.
| author | Neal Norwitz <nnorwitz@gmail.com> |
|---|---|
| date | Mon, 26 Feb 2007 22:22:47 +0000 |
| parents | 04f5cbc74424 |
| children | 61fee1853ca8 |
comparison
equal
deleted
inserted
replaced
| 40948:3093ea9b4024 | 40949:e759fd8d95ae |
|---|---|
| 219 | 219 |
| 220 _PyImport_Init(); | 220 _PyImport_Init(); |
| 221 | 221 |
| 222 /* initialize builtin exceptions */ | 222 /* initialize builtin exceptions */ |
| 223 _PyExc_Init(); | 223 _PyExc_Init(); |
| 224 _PyImport_FixupExtension("exceptions", "exceptions"); | |
| 225 | 224 |
| 226 /* phase 2 of builtins */ | 225 /* phase 2 of builtins */ |
| 227 _PyImport_FixupExtension("__builtin__", "__builtin__"); | 226 _PyImport_FixupExtension("__builtin__", "__builtin__"); |
| 228 | 227 |
| 229 _PyImportHooks_Init(); | 228 _PyImportHooks_Init(); |
| 1166 moduleName = PyObject_GetAttrString(exception, "__module__"); | 1165 moduleName = PyObject_GetAttrString(exception, "__module__"); |
| 1167 if (moduleName == NULL) | 1166 if (moduleName == NULL) |
| 1168 err = PyFile_WriteString("<unknown>", f); | 1167 err = PyFile_WriteString("<unknown>", f); |
| 1169 else { | 1168 else { |
| 1170 char* modstr = PyString_AsString(moduleName); | 1169 char* modstr = PyString_AsString(moduleName); |
| 1171 if (modstr && strcmp(modstr, "exceptions")) | 1170 if (modstr && strcmp(modstr, "__builtin__")) |
| 1172 { | 1171 { |
| 1173 err = PyFile_WriteString(modstr, f); | 1172 err = PyFile_WriteString(modstr, f); |
| 1174 err += PyFile_WriteString(".", f); | 1173 err += PyFile_WriteString(".", f); |
| 1175 } | 1174 } |
| 1176 Py_DECREF(moduleName); | 1175 Py_DECREF(moduleName); |
