Define __debug__ as 0 if -O is given, 1 otherwise. Also test for

errors in initializing the dictionary.
This commit is contained in:
Guido van Rossum 1997-03-11 18:43:26 +00:00
parent 7c53111d5b
commit 1c6a459921

View File

@ -1682,6 +1682,10 @@ initbuiltin()
initerrors();
(void) dictinsert(builtin_dict, "None", None);
(void) dictinsert(builtin_dict, "Ellipsis", Py_Ellipsis);
(void) dictinsert(builtin_dict, "__debug__",
newintobject(Py_OptimizeFlag == 0));
if (err_occurred())
fatal("error creating None/Ellipsis/__debug__ in __builtin__");
}